2

I have a document that has an array of objects. I know how to retrieve the object itself using pointer notation.

rapidjson::Value* ptr = GetValueByPointer(document, "/object1/object2/array/0");

I can then access members of that object as needed.

(*ptr)["name"].GetString();

But I'm trying to figure out how to get to name directly for a specific index in the array using the pointer notation above.

I tried:

rapidjson::Value* name = GetValueByPointer(document, "/object1/object2/array/0/name");

But name is NULL. How can I do this?

User51610
  • 453
  • 5
  • 18

0 Answers0