- Home /
Nested variables in a JSON object
string GroupName="Night Fighters"; string GroupMemberID="TG1"; string GroupMemberName="Tommy Gun"; string GroupEquipmentDescription="Machine Gun";
public JSONObject Testjson() { var data = new JSONObject { {"Group Name" , GroupName}, {"Group Member" , GroupMemberID, GroupMemberName}, {"Group Equipment" , GroupEquipmentID, GroupEquipmentDescription} }; Debug.Log(data); return data; }
It's telling me that the overload is wrong- add takes three arguments. I'm using the boomlagoon library. Not sure how to do a nested here. No help from the readme, it only shows single items. Thanks!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Looking for Code that will Read JSON files (C# code) 2 Answers
The Object you want to Instantiate is null 0 Answers
Instantiate a sprite using json data value (C# Unity) 2 Answers