Click here to Skip to main content
15,889,116 members
Home / Discussions / Article Writing
   

Article Writing

 
AnswerRe: Printed articles Pin
Greg Utas26-Jan-21 10:13
professionalGreg Utas26-Jan-21 10:13 
AnswerRe: Printed articles Pin
Sean Ewington26-Jan-21 10:22
staffSean Ewington26-Jan-21 10:22 
AnswerRe: Printed articles Pin
Nelek26-Jan-21 10:40
protectorNelek26-Jan-21 10:40 
Questionplease save my article Pin
raddevus25-Jan-21 7:53
mvaraddevus25-Jan-21 7:53 
AnswerRe: please save my article Pin
Sean Ewington25-Jan-21 7:57
staffSean Ewington25-Jan-21 7:57 
GeneralRe: please save my article Pin
raddevus25-Jan-21 8:10
mvaraddevus25-Jan-21 8:10 
AnswerRe: please save my article Pin
#realJSOP21-Feb-21 5:09
mve#realJSOP21-Feb-21 5:09 
GeneralReading the Whole Array of Data from JSON Pin
Litu Sahoo10-Jan-21 2:40
Litu Sahoo10-Jan-21 2:40 
Hi

I want the array of data under items, using this code i am able to get only the value under the first structure of data under items. How can i loop to the second structure of data under items, and further more if present. I am doing this using boost in c++.

Can someone help on this.

items=root.get_child("Serial");
for (boost::property_tree::ptree::iterator itprop = items.begin(); itprop != items.end(); ++itprop)
{
for(boost::property_tree::ptree::iterator it1=itprop->second.begin();it1!=itprop->second.end();++it1)
{
if(it1->first=="Items")
{
boost::property_tree::ptree& rootschild=it1->second;
cout<<"Size is "<<rootschild.size()<<"\n";
for(boost::property_tree::ptree::iterator="" it2="rootschild.begin();it2!=rootschild.end();++it2)
" {
="" it3="it2-">second.begin();it3!=it2->second. end();++it3)
{
std::cout<<it3->first<<": "<<it3->second.get_value<string>()<<"\n";
}
}
}

{
"Header": {
"Name": "abcd",
"Email": "xyz"
},
"Serial": [{
"flavour": "Green",
"Color": "9",
"code": "103",

"Items": [{
"date": "2020/11",
"value": "3.5",
"serial": "01"
}, {
"date": "2020/10",
"value": "3.4",
"serial": "03"
}]
}]
}

With Regards
GeneralRe: Reading the Whole Array of Data from JSON Pin
Greg Utas10-Jan-21 4:09
professionalGreg Utas10-Jan-21 4:09 
QuestionHow to make images show up. Pin
theoldfool8-Jan-21 1:33
professionaltheoldfool8-Jan-21 1:33 
AnswerRe: How to make images show up. Pin
Pete O'Hanlon8-Jan-21 2:22
mvePete O'Hanlon8-Jan-21 2:22 
AnswerRe: How to make images show up. Pin
Nelek8-Jan-21 2:47
protectorNelek8-Jan-21 2:47 
GeneralRe: How to make images show up. Pin
theoldfool8-Jan-21 2:53
professionaltheoldfool8-Jan-21 2:53 
GeneralRe: How to make images show up. Pin
Nelek8-Jan-21 3:00
protectorNelek8-Jan-21 3:00 
AnswerRe: How to make images show up. Pin
Sean Ewington8-Jan-21 3:00
staffSean Ewington8-Jan-21 3:00 
GeneralRe: How to make images show up. Pin
theoldfool8-Jan-21 4:11
professionaltheoldfool8-Jan-21 4:11 
Questionblog needing help Pin
Nelek6-Jan-21 3:49
protectorNelek6-Jan-21 3:49 
AnswerRe: blog needing help Pin
Sean Ewington6-Jan-21 5:23
staffSean Ewington6-Jan-21 5:23 
QuestionI have added an article yesterday, but it still has "pending" status Pin
SimbirSoft23-Dec-20 0:18
SimbirSoft23-Dec-20 0:18 
AnswerRe: I have added an article yesterday, but it still has "pending" status Pin
Greg Utas23-Dec-20 1:42
professionalGreg Utas23-Dec-20 1:42 
AnswerRe: I have added an article yesterday, but it still has "pending" status Pin
Nelek23-Dec-20 3:40
protectorNelek23-Dec-20 3:40 
QuestionUnable to make article available. Pin
Leif Simon Goodwin14-Dec-20 22:24
Leif Simon Goodwin14-Dec-20 22:24 
AnswerRe: Unable to make article available. Pin
Sean Ewington15-Dec-20 3:11
staffSean Ewington15-Dec-20 3:11 
GeneralRe: Unable to make article available. Pin
Leif Simon Goodwin15-Dec-20 7:12
Leif Simon Goodwin15-Dec-20 7:12 
GeneralRe: Unable to make article available. Pin
Sean Ewington15-Dec-20 7:47
staffSean Ewington15-Dec-20 7:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.