XpertWorlock Posted September 15, 2010 Share Posted September 15, 2010 Let's say I have the following JSON object : ({"test":{"status":"good"}}) Now how would I add "test2" to make it : ({"test":{"status":"good"}, "test2":{"status":"bad"} }) Thanks for any help Link to comment https://forums.phpfreaks.com/topic/213448-add-new-value-to-json-object/ Share on other sites More sharing options...
trq Posted September 15, 2010 Share Posted September 15, 2010 obj.test2 = { status: 'bad' } Link to comment https://forums.phpfreaks.com/topic/213448-add-new-value-to-json-object/#findComment-1111228 Share on other sites More sharing options...
XpertWorlock Posted September 15, 2010 Author Share Posted September 15, 2010 I knew it was something simple but the ol brain wasn't thinking. Link to comment https://forums.phpfreaks.com/topic/213448-add-new-value-to-json-object/#findComment-1111229 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.