tusharjoshi

jsops

Feb 22nd, 2022 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var response = {
  2.   data: [
  3.     {
  4.       name: "Name1",
  5.       age: 19,
  6.       city: "C01"
  7.     },
  8.     {
  9.       name: "Name2",
  10.       age: 29,
  11.       city: "C01"
  12.     },
  13.     {
  14.       name: "Name3",
  15.       age: 18,
  16.       city: "C02"
  17.     }
  18.   ],
  19.   cities: [
  20.     {
  21.       id: "C01",
  22.       name: "Chennai"
  23.     },
  24.     {
  25.       id: "C02",
  26.       name: "Mumbai"
  27.     },
  28.     {
  29.       id: "C03",
  30.       name: "Raipur"
  31.     },
  32.     {
  33.       id: "C04",
  34.       name: "Agra"
  35.     }
  36.   ]
  37. }
  38.  
  39.  
  40. var onlyAgeLessThan20 = null
  41.  
  42.  
  43. var onlyNameCityProps = null
  44.  
  45.  
  46. var totalAge = null
  47.  
  48.  
  49. // Write declaration for variables p1 and p2 to receive
  50. // the first two objects from the array 'list'
  51.  
  52.  
  53. // Write declaration of variables name and city to be
  54. // assigned from the variable p1 defined above
Add Comment
Please, Sign In to add comment