How do you add "key": "value" pairs in an embedded dictionary?

{
"id": 1,
"name": "Tim the Beaver",
"school": {
"name": "Massachusetts Institute of Technology"
},
"enrolled": true,
"classes": ["6.001", "18.01", "8.01"]
}


In the example above How can you programatically add pairs key: value under “school” to get i. e.
May be: When Button1.Click
“school”: {"name": "Massachusetts Institute of Technology",
“room1”: 15,
“room2”: 17
}

Try this. Call the AddRoom procedure if you want to add a room.

If you would like to add a room using the procedure, use this.

blocks (6)

After adding room1 and 15, it should look something like this.

{

"id":1,
 "name":"Tim Beaver",
 "school":{
   "name":"Massachusetts Institute of Technology",
   "room1":15
 }
}

AIA: KeyValue.aia (2.7 KB)

2 Likes

How fast responsive! Thank you so much

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.