if (json_object_object_get_ex(jdesc, string_targets, &targets)) {
n = json_object_array_length(targets);
for (i = 0 ; i < n ; i++) {
targ = json_object_array_get_idx(targets, i);
if (json_object_object_get_ex(jdesc, string_targets, &targets)) {
n = json_object_array_length(targets);
for (i = 0 ; i < n ; i++) {
targ = json_object_array_get_idx(targets, i);