I have an external API response which returns a list of codes.
{
'id': '401547429626',
'sequenceNumber': '62600',
'type': {
'id': '5',
'text': 'xxx',
'abbreviation': 'xxx'
},
{
'id': '401547429648',
'sequenceNumber': '64800',
'type': {
'id': '24',
'text': 'Pass Reception',
'abbreviation': 'REC'
}
I have an object which containing properties aligning to the returned Id's, i.e. 5, 24, etc.
'5': {
'homeTeam': {
'playTypeId': 5,
'playTypeDec': 'Sacks',
'count': null
}
I am looping through the API response and need to update my object using the 'id'. How do I dynamically reference the object property (the existing variable)?
Apologies I am very new to the product. Much appreciated.