I am just a beginner in swift. i want to filter array of json objects having certain property and create new array of json from that.
my array is :
[{
"marked" : 4,
"attempted" : true,
"correct" : 4,
"subject" : 1,
"status" : true,
"question" : 550,
"answer" : 34256,
"time" : 23,
"score" : 10,
"chapter" : 26
}, {
"marked" : 1,
"attempted" : true,
"correct" : 1,
"subject" : 1,
"status" : true,
"question" : 566,
"answer" : 34317,
"time" : 33,
"score" : 14,
"chapter" : 26
}, {
"marked" : 4,
"attempted" : true,
"correct" : 1,
"subject" : 1,
"status" : true,
"question" : 590,
"answer" : 34276,
"time" : 33,
"score" : 15,
"chapter" : 26
}]
i want an array in which marked and correct have same values.
How can i do that in swift?