1# <small>nlohmann::json_pointer::</small>parent_pointer 2 3```cpp 4json_pointer parent_pointer() const; 5``` 6 7Returns the parent of this JSON pointer. 8 9## Return value 10 11Parent of this JSON pointer; in case this JSON pointer is the root, the root itself is returned. 12 13## Complexity 14 15Linear in the length of the JSON pointer. 16 17## Examples 18 19??? example 20 21 The example shows the result of `parent_pointer` for different JSON Pointers. 22 23 ```cpp 24 --8<-- "examples/json_pointer__parent_pointer.cpp" 25 ``` 26 27 Output: 28 29 ```json 30 --8<-- "examples/json_pointer__parent_pointer.output" 31 ``` 32 33## Version history 34 35Added in version 3.6.0. 36