Saturday 20 October 2018

Multiple json objects

I'm not sure how to word this so please bear with me.So let's say I have these 2 json files:1.json{ "example": [ { "fruitId": "101", "fruitColor": "Red" }, { "fruitId": "102", "fruitColor": "Yellow" } ] } 2.json{ "fruits": [ { "fruitId": "101", "fruitName": "Apple" }, { "fruitId": "102", "fruitName": "Banana" } ] } How would I replace the fruitId in 1.json with the fruitName from 2.json? So this is how I want 1.json to look:{ "example": [ { "fruitId": "Apple", "fruitColor": "Red" }, { "fruitId": "Banana", "fruitColor": "Yellow" } ] }

Submitted October 20, 2018 at 10:39PM by IcyHeartWarmSmile

No comments:

Post a Comment