Iterating through an array of objects #2524
-
Is there a way to iterate Array of Objects??
Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
What do you want to achieve? Using iterators as well as the |
Beta Was this translation helpful? Give feedback.
-
Hi @nlohmann sorry for the late reply and thanks for the quick reponse :) Well, I want to iterate through each key value pairs of json object which is in array.
I am getting this error:: Thanks in advance |
Beta Was this translation helpful? Give feedback.
Hi @nlohmann sorry for the late reply and thanks for the quick reponse :)
Well, I want to iterate through each key value pairs of json object which is in array.
I am using iterator like this::
I am getting this error::
'items': is not a member of 'nlohmann::detail::iter_impl<nlohmann::basic_json<std::map,std::vector,std::st
ring,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<uint8_t>>>>'
'el': references must be initialized
Thanks in advance