-
Describe what you want to achieve.
There are two array A, B in the same size. In python I can use zip(A, B) to get elements from them at the same time. But I am not sure how to get it using this cpp.
-
Describe what you tried.
I first get the array size by 'A.size()', then I iterate the index from 0 to the size. And using A[idx] and B[idx] to get elements separately.
However, it raise
terminate called after throwing an instance of 'nlohmann::detail::invalid_iterator'
what(): [json.exception.invalid_iterator.208] cannot use operator[] for object iterators
And I am sure A and B is an array instead of object since I A.is_array() is True and B.is_array() is True too
-
Describe which system (OS, compiler) you are using.
LInux
-
Describe which version of the library you are using (release version, develop branch).
develop branch, 3.7.0
Describe what you want to achieve.
There are two array A, B in the same size. In python I can use zip(A, B) to get elements from them at the same time. But I am not sure how to get it using this cpp.
Describe what you tried.
I first get the array size by 'A.size()', then I iterate the index from 0 to the size. And using A[idx] and B[idx] to get elements separately.
However, it raise
And I am sure A and B is an array instead of object since I A.is_array() is True and B.is_array() is True too
Describe which system (OS, compiler) you are using.
LInux
Describe which version of the library you are using (release version, develop branch).
develop branch, 3.7.0