Best practice for aggregating database & api call into repeating group

I am wondering what the best practice method for dealing with this scenario is - any help is greatly appreciated.

If I have a database:

ID Color
1 Red
2 Blue
3 Green

And an API call that returns:

{"sensors":[{"lastvalue":"10","color":"Red"},{"lastvalue":"20","color":"Blue"},{"lastvalue":"30","color":"Yellow"}]}

I have a repeating group setup to show the database information but I want to add a column that shows the proper ‘lastvalue’ from the API when the color matches the database entry on that repeating group row.

Repeating Group Expected Output:

ID Color LastValue
1 Red 10
2 Blue 20
3 Green

Thanks!!

Assuming you can’t (or don’t want to) just use the API as the RG data source, you can just have another RG on the page (it can be hidden) with the API data, then in the main database RG, add a text element for the Last value, and set its content to be the API RG’s list of items, filtered by the Colour name.