Writing into JSON file iOS Swift -
i have json file locally in app. want add new element in file programmatically. below json format -
{ "menu":{ "submenu":[ { "name":"name1", "link":"link2" } ] } }
i want add element in submenu below -
{ "menu":{ "submenu":[ { "name":"name1", "link":"link1" }, { "name":"name2", "link":"link2" } ] } }
would possible programatically? thank!
Comments
Post a Comment