I don't really have an examples to point you at, but I think briefly what you'll want to do is:
split the input on dots
create a "params" structure to pass in to json_c_visit to be passed as the userarg argument that includes:
the split input as an array of char *'s.
the number of components of that split input
the depth that you're currently at
a json_object *result for passing back the final result, if any
write a handler function that, on each call,
checks whether you're handling a field in an object whose key matches the input component at the current depth.
If it doesn't, or it's not an object field at all, return JSON_C_VISIT_RETURN_SKIP.
If it does match, set params->depth++ and return JSON_C_VISIT_RETURN_CONTINUE.
When you reach the end of your split input, set that jso in the params structure and return JSON_C_VISIT_RETURN_STOP.
That's just a rough outline, and there are a number of details you'd need to figure out especially with respect to what to do when you _don't_ find a matching object field, and handling the 1st & 2nd visits of each json_type_object, etc...
Eric