I'm trying to figure out how to iterate through an indexed $avp that holds json 
query results. The docs are kind of spotty. Can someone share a working snippet 
of code that iterates through an $avp ? This one isn't quite working for me. 
First off it says only $var and $avp can be iterated, but this example has a 
$json var.

# iterate through all JSON documents returned by a MongoDB query
    cache_raw_query("mongodb:location", "{... find ...}", "$avp(res)");
    for ($json(contact) in $(avp(res)[*]))
        xlog("Found: $json(contact/phone) $json(contact/email)\n");

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to