0

I am getting 2 array of object from my rest api and I want to output name of corresponding _id in other collection in a html table. Pls help.

Object 1

[{
_id : '5gdgjkeugg47ghjd',
name : 'Santosh',
},
{
_id : '5ghdkbbdjjndkbdj'
name : 'Amit'
}]

Object 2

[
{
_id :1,
value: 'abc'
Type: 'refering to id of above object'
},
{
_id :2,
value: 'abc',
Type: 'refering to id of above object'
}
]
  • See [Analog to SQL 'JOIN' for Javascript objects?](https://stackoverflow.com/questions/22593515/analog-to-sql-join-for-javascript-objects) – Irfan434 Feb 23 '20 at 03:13
  • _I want to output name of corresponding id_. Can you provide an example of what you expect to see? I am not sure what you want to do here. What is the "correspondence"? What have you already tried? What language are you using? Can you share any of your code and describe where you are stuck? Are you getting any errors that you can share with us? – andrewJames Feb 23 '20 at 03:22
  • Thank you Ahmad and andrewjames. I managed it from server side, that was much easy. – Santosh Pandey Feb 28 '20 at 15:34

0 Answers0