I am parsing a JSON data from a URL. i am using this example to parse the data i successfully parsed the data, now i want a little bit thing that if the product available i want to keep this in green color but if the product available i want the keep that name in some other color.
my Data for the availability is.
this is my json data for available
{
"id":"1234",
"price": "311.95",
"seller": "Shopclues.com",
"availability": "Available",
"currency": "USD"
}
this is for not avaliable
{
"id":"4321"
"price": "290.05",
"seller": "Tradus.com",
"availability": "Not Available",
"currency": "USD"
}
So i want the data like if product is avaliable i want that "id":"1234" should be in green colour other wise it should some other color like black or gray or red.
i tried with normal data but this i am getting forma URL so give me any suggestion for dynamic JSON data which is getting from a url.