John

John

  • NA
  • 928
  • 131k

how to convert json element to boolean or bool

Dec 22 2017 5:11 AM
how to convert the json object Summary and Expanded to bool
 
below is the expected result
 
"ID": 7,
"Title": "Software validation, research and implementation",
"ParentID": null,
"OrderID": 0,
"Start": "Date(1401667200000)",
"End": "Date(1405123200000)",
"PercentComplete": 0.43,
"Summary": true,
"Expanded": true
}, {
"ID": 11,
"Title": "Research",
"ParentID": 7,
"OrderID": 1,
"Start": "Date(1401667200000)",
"End": "Date(1402099200000)",
"PercentComplete": 0.43,
"Summary": true,
"Expanded": true
}, {
"ID": 12,
"Title": "Design",
"ParentID": 7,
"OrderID": 2,
"Start": "Date(1402272000000)",
"End": "Date(1402704000000)",
"PercentComplete": 0.60,
"Summary": true,
"Expanded": true
}
 
 
the actual output json is below
 
"ID": 7,
"Title": "Software validation, research and implementation",
"ParentID": null,
"OrderID": 0,
"Start": "Date(1401667200000)",
"End": "Date(1405123200000)",
"PercentComplete": 0.43,
"Summary": "true",
"Expanded": "true"
}, {
"ID": 11,
"Title": "Research",
"ParentID": 7,
"OrderID": 1,
"Start": "Date(1401667200000)",
"End": "Date(1402099200000)",
"PercentComplete": 0.43,
"Summary":"true",
"Expanded":"true"
}, {
"ID": 12,
"Title": "Design",
"ParentID": 7,
"OrderID": 2,
"Start": "Date(1402272000000)",
"End": "Date(1402704000000)",
"PercentComplete": 0.60,
"Summary": "true",
"Expanded":"true"
},
 

Answers (2)