]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/third_party/nlohmann-json/doc/examples/operatorarray__size_type_const.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / third_party / nlohmann-json / doc / examples / operatorarray__size_type_const.cpp
1 #include <iostream>
2 #include <nlohmann/json.hpp>
3
4 using json = nlohmann::json;
5
6 int main()
7 {
8 // create JSON array
9 const json array = {"first", "2nd", "third", "fourth"};
10
11 // output element at index 2 (third element)
12 std::cout << array.at(2) << '\n';
13 }