loop through objects cpp code example Example: c++ loop trhought object for (auto const& i : data) { std::cout << i.name; }