i have been trying to match a certain value from the values(which is in array) of key-value pair.Like if i wanna search for id 462 ,i want to search it iteratively like first search in 2013 if not found then 2014 and so on.
i have tried Object.values(x) but its returning all the arrays for both 2 years.
x={'2013': 
   { matchId: 
      [ 
        '386',
        '387',
        '388',
        '389',
        '390',
         ] },
  '2014': 
   { matchId: 
      [
        '462',
        '463',
        '464',
        '465',
        '466',
         ] },
}
if value is found i want to insert some new key-value pair in that (year eg:-2013) like
{'2013': 
   { matchId: 
      [ 
        '386',
        '387',
        '388',
        '389',
        '390',
         ] 
      'Andrew':'23',
      'Castle':32}
}