Using more than one JSON Api URLs

I have a page with pictures and when you click a picture it directs you to detail page with bigger version of the picture and its details.

I have 2 JSON api URLs. I need to use them both, one is for the main page and detail page, and the other is for only detail page.

Like that : on the main page(index.js), I use title and image attributes of the first URL, and on the detail page(pic.js) I should use image and content attribute from the first URL and again content attribute from the second URL.

How can I do it? I can post my codes if needed.

Just have the API call for the details return all data you need for that one record, including the same data as used by index. I guess it’s not that much data.

A route can only depend on data from another route if it is nested somewhere below that route.

Ok thanks but where and how am I gonna return two URL’s ?