Love Zhaoying Posted August 23, 2022 Share Posted August 23, 2022 (edited) Peeve: I finally figured out how to store a JSON Object in a JSON Array. string sKey; // Key for a JSON object - We will look for this later when iterating the JSON array string sObject; // This is an existing JSON object we want to add. It contains something like "{Key1:Value1, Key2:Value2, ..}" string sArray; // A JSON array - we are adding the JSON object to it sArray = llJsonSetValue(sArray, [JSON_APPEND], llJsonSetValue("", [sKey], sObject) ); My mind wasn't built for nested calls. Of course, the same could be done like this: string sTemp = llJsonSetValue("", [sKey], sObject); // Make a new JSON obect: "{sKey: {sObject} }" sArray = llJsonSetValue(sArray, [JSON_APPEND], sTemp); // Skip the nest Whaddya expect, I'm a lion, not a bird. I live in a cave, not a nest! Edited August 23, 2022 by Love Zhaoying 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now