What is the best way to consume the JSON below then fully resolve it as a complete object? Basically I need to consume a service from point (A) as well as data from point (B) to be able to create a "complete" local object (C)?
{
"heros": [
{
"name": "batman",
"dob": "1963-02-19",
"superPowers": {
"href": "http://link-to-api/powers/batman"
}
},
...
]
}
Do I just nest the REST calls if the href property is provided? I'm just wondering if there is a NPM package (didn't see anything obvious when I searched) or best practice to follow.
General advice in this space also welcome :)