I have this JSON structure, I want to create 2 arrays out of this array of JSON. one array having all the values from key "employee only" to ""Annual OOP max / entire famliy" (from each object in JSON array) and 2nd array to have values from key "Primary care doctor visit" to end of the object".
array 1 = [86.1,30.5,33.2, 291.3, 154.1, 121.2..............13700, "$13,100 family"] (so for eg "employee only" key from object1 then object2 then till last object, again next key from object 1...till last object)
similarly in array 2 starting from key "Primary care doctor visit" till end of object
array 2 = ["75% covered after deductible", "$35 copay",35,............, "See HMO provider"]
How can i achieve this in javascript?
[
{
"Provider ID": 0,
"Broker ID": 16,
"[Plan name, employee-facing]": "Contribution Plan",
"employee Only": 86.1,
"employee + Spouse/Partner": 291.3,
"employee + Child(ren)": 121.4,
"employee + Family": 311.9,
" max contrib. / employee only": "Credited to your HRA:\n$250",
" max contrib. / employee + dependents": "Credited to your HRA:\n$500",
"Annual ded. / employee only": 1750,
"Annual ded. / employee + dependents": 3500,
"Annual OOP max / per person": 6850,
"Annual OOP max / entire famliy": 13700,
"Primary care doctor visit": "75% covered after deductible",
"Specialist doctor visit": "75% covered after deductible",
"Virtual doctor visit": "$4 copay Doctor on Demand",
"Eligible preventive care": "100% covered, no deductible",
"Centers of Excellence": "100% covered, no deductible",
"Urgent care": "75% covered after deductible",
"Emergency": "$300 copay, then 75% covered after deductible",
"Hospitalization": "75% covered after deductible",
"Generic drugs": 4,
"Brand-name drugs": "$50 or 25% of allowed cost*",
"Speciality drugs": "$50 or 20% of allowed cost*"
},
{
"Provider ID": 0,
"Broker ID": 23,
"[Plan name, employee-facing]": "Premier Plan",
"employee Only": 30.5,
"employee + Spouse/Partner": 154.1,
"employee + Child(ren)": 48.8,
"employee + Family": 180.8,
" max contrib. / employee only": "None",
" max contrib. / employee + dependents": "None",
"Annual ded. / employee only": 2750,
"Annual ded. / employee + dependents": 5500,
"Annual OOP max / per person": 6850,
"Annual OOP max / entire famliy": 13700,
"Primary care doctor visit": "$35 copay",
"Specialist doctor visit": "$75 copay",
"Virtual doctor visit": "$4 copay Doctor on Demand",
"Eligible preventive care": "100% covered, no deductible",
"Centers of Excellence": "100% covered, no deductible",
"Urgent care": "$75 copay",
"Emergency": "$300 copay, then 75% covered after deductible",
"Hospitalization": "75% covered after deductible",
"Generic drugs": 4,
"Brand-name drugs": "$50 or 25% of allowed cost*",
"Speciality drugs": "$50 or 20% of allowed cost*"
},
{
"Benefit/feature": null,
"Provider ID": 197,
"[Plan name, employee-facing]": "Kaiser California Low Option South HMO",
"employee Only": 33.2,
"employee + Spouse/Partner": 121.2,
"employee + Child(ren)": 46.7,
"employee + Family": 138,
" max contrib. / employee only": "None",
" max contrib. / employee + dependents": "None",
"Annual ded. / employee only": "$1,500 individual",
"Annual ded. / employee + dependents": "$3,000 family",
"Annual OOP max / per person": "$6,550 individual",
"Annual OOP max / entire famliy": "$13,100 family",
"Eligible preventive care services": "100% covered, no deductible",
"Primary care physician visits": 35,
"Specialists": 50,
"Centers of Excellence": "Not available",
"Virtual doctor visits": "Not available",
"Hospitalization": "75% covered after deductible",
"Emergency": "75% covered after deductible",
"Urgent care": "75% covered after deductible",
"Generic drugs": 10,
"Brand-name drugs": 50,
"Speciality drugs": "See HMO provider"
}
]
Object.entriesto explore the Objects within the Array and play around with it.