There is a JSON
object and it's structure has shown in the picture. how could i filter this object by a Key named "State"
and as result get a second array ??
to make it clear, i need a translated code as equal as this MySQL code : SELECT * FROM data.sepah WHERE state = 'sth'
could anyone help me out solve this problem ?
And My full JSON file is like this :
{
"sepah": [
{
"row" : "1",
"city" : "newYork",
"yegan" : "california",
"raste" : "tese",
"clinic" : "+",
"degree" : "1",
"notation" : "empty",
"kind" : "airforce",
"state" : "azerbaijan-east"
},
{
"row" : "1",
"city" : "اصفهان",
"yegan" : "۸۲ امام حسین",
"raste" : "پدافندی",
"clinic" : "دارد",
"degree" : "۱",
"notation" : "دو مرکز درمانی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
},
{
"row" : "1",
"city" : "اصفهان",
"yegan" : "۸۲ امام حسین",
"raste" : "پدافندی",
"clinic" : "دارد",
"degree" : "۱",
"notation" : "دو مرکز درمانی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
},
{
"row" : "1",
"city" : "اصفهان",
"yegan" : "۸۲ امام حسین",
"raste" : "پدافندی",
"clinic" : "دارد",
"degree" : "۱",
"notation" : "دو مرکز درمانی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
}
],
"naja": [
{
"id" : "1",
"city" : "ارتش هرمزگان",
"far_entz_ostan" : "۸۲ امام حسین",
"far_entz_shahr" : "پدافندی",
"far_marzbani" : "دارد",
"hang_marzi" : "۱",
"yegan_vije" : "دو مرکز درمانی",
"clinic" : "ارتش",
"hospital" : "نیروی هوایی",
"markaz_amoozeshi" : "خراسان رضوی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
},
{
"id" : "1",
"city" : "ارتش هرمزگان",
"far_entz_ostan" : "۸۲ امام حسین",
"far_entz_shahr" : "پدافندی",
"far_marzbani" : "دارد",
"hang_marzi" : "۱",
"yegan_vije" : "دو مرکز درمانی",
"clinic" : "ارتش",
"hospital" : "نیروی هوایی",
"markaz_amoozeshi" : "خراسان رضوی",
"state" : "azerbaijan-east"
},
{
"id" : "1",
"city" : "ارتش هرمزگان",
"far_entz_ostan" : "۸۲ امام حسین",
"far_entz_shahr" : "پدافندی",
"far_marzbani" : "دارد",
"hang_marzi" : "۱",
"yegan_vije" : "دو مرکز درمانی",
"clinic" : "ارتش",
"hospital" : "نیروی هوایی",
"markaz_amoozeshi" : "خراسان رضوی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
},
{
"id" : "1",
"city" : "ارتش هرمزگان",
"far_entz_ostan" : "۸۲ امام حسین",
"far_entz_shahr" : "پدافندی",
"far_marzbani" : "دارد",
"hang_marzi" : "۱",
"yegan_vije" : "دو مرکز درمانی",
"clinic" : "ارتش",
"hospital" : "نیروی هوایی",
"markaz_amoozeshi" : "خراسان رضوی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
}
],
"aja": [
{
"id" : "1",
"city" : "اصفهان",
"yegan" : "۸۲ امام حسین",
"raste" : "پدافندی",
"clinic" : "دارد",
"degree" : "۱",
"notation" : "دو مرکز درمانی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
},
{
"id" : "1",
"city" : "اصفهان",
"yegan" : "۸۲ امام حسین",
"raste" : "پدافندی",
"clinic" : "دارد",
"degree" : "۱",
"notation" : "دو مرکز درمانی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
},
{
"id" : "1",
"city" : "اصفهان",
"yegan" : "۸۲ امام حسین",
"raste" : "پدافندی",
"clinic" : "دارد",
"degree" : "۱",
"notation" : "دو مرکز درمانی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
},
{
"id" : "1",
"city" : "اصفهان",
"yegan" : "۸۲ امام حسین",
"raste" : "پدافندی",
"clinic" : "دارد",
"degree" : "۱",
"notation" : "دو مرکز درمانی",
"kind" : "نیروی هوایی",
"state" : "azerbaijan-east"
}
],
"setad_kol_sepah": [
{
"id" : "1",
"city" : "اصفهان",
"sepah_ostani" : "۸۲ امام حسین",
"nahiye_moghavemat" : "پدافندی",
"tip_mardom_paye" : "دارد",
"darmangah" : "۱",
"daraje" : "دو مرکز درمانی",
"markaz_amoozeshi" : "ارتش",
"state" : "azerbaijan-east"
},
{
"id" : "1",
"city" : "اصفهان",
"sepah_ostani" : "۸۲ امام حسین",
"nahiye_moghavemat" : "پدافندی",
"tip_mardom_paye" : "دارد",
"darmangah" : "۱",
"daraje" : "دو مرکز درمانی",
"markaz_amoozeshi" : "ارتش",
"state" : "azerbaijan-east"
},
{
"id" : "1",
"city" : "اصفهان",
"sepah_ostani" : "۸۲ امام حسین",
"nahiye_moghavemat" : "پدافندی",
"tip_mardom_paye" : "دارد",
"darmangah" : "۱",
"daraje" : "دو مرکز درمانی",
"markaz_amoozeshi" : "ارتش",
"state" : "azerbaijan-east"
},
{
"id" : "1",
"city" : "اصفهان",
"sepah_ostani" : "۸۲ امام حسین",
"nahiye_moghavemat" : "پدافندی",
"tip_mardom_paye" : "دارد",
"darmangah" : "۱",
"daraje" : "دو مرکز درمانی",
"markaz_amoozeshi" : "ارتش",
"state" : "azerbaijan-east"
}
]
}