I'm trying to merge some jsons. I tried these answers but I think they don't fit my needs.
I got 2(or more) of these jsons
{
item: {
icon: "http://services.runescape.com/m=itemdb_rs/4922_obj_sprite.gif?id=2",
icon_large: "http://services.runescape.com/m=itemdb_rs/4922_obj_big.gif?id=2",
id: 2,
type: "Default",
typeIcon: "http://www.runescape.com/img/categories/Default",
name: "Cannonball",
description: "Ammo for the Dwarf Cannon.",
current: {
trend: "neutral",
price: 208
},
today: {
trend: "positive",
price: "+8"
},
members: "true",
day30: {
trend: "positive",
change: "+8.0%"
},
day90: {
trend: "negative",
change: "-4.0%"
},
day180: {
trend: "positive",
change: "+9.0%"
}
}
}
How do I add them to something like this?
{
items: [
{
icon: "http://services.runescape.com/m=itemdb_rs/4922_obj_sprite.gif?id=2",
icon_large: "http://services.runescape.com/m=itemdb_rs/4922_obj_big.gif?id=2",
id: 2,
type: "Default",
typeIcon: "http://www.runescape.com/img/categories/Default",
name: "Cannonball",
description: "Ammo for the Dwarf Cannon.",
//Same other stuff here
},
{
icon: "http://services.runescape.com/m=itemdb_rs/4922_obj_sprite.gif?id=2",
icon_large: "http://services.runescape.com/m=itemdb_rs/4922_obj_big.gif?id=2",
id: 2,
type: "Default",
typeIcon: "http://www.runescape.com/img/categories/Default",
name: "Cannonball",
description: "Ammo for the Dwarf Cannon.",
//Same other stuff here
}
]
}