By parsing, i mean i want to print he values of the json object:
I want the output as “Neha Prabhu opted for the subjects eng, bio and phy”
$$tmp = ^jsonopen(GET $$url “” $$user_agent)
@1 = query(direct_v ? fname ? 1)
@2 = query(direct_v ? sname ? 1)
@2object @1object opted for the subjects
$subjects = ^jsonpath(.values.0.subjects ^jsonparse( $$tmp ))
$no_of_subjects = ^length($subjects)
$count = 0
$limit = $no_of_subjects- 1
loop( $no_of_subjects )
{
^jsonpath(.values.0.subjects.$count ^jsonparse( $$tmp ))
$count += 1
if ($count < $limit) {, }
if ($count == $limit ) { and }
if ($count == $no_of_resp ) {.}
}
I was able to do it using the above code, but instead of using jsonparse I want to use @0 = ^query(direct_sv $_json values ?), how can i do it?