Json Data Cgridview

[size=“3”]Is it possible to provide json object instead of a model class object to cgridview ??????[/size]

[b][size="3"]i am getting all the data through an API returning json.




Dear Friend

I have no experiance.

The following is my suggestion.

1.Use json_decode to convert the json object to php array.

2.Use CArrayDataProvider.

3.Then access the array element like $data[key].


Wooow. it worked :)

Many Thanks mate.

Can anyone please share link with example. #YiiNovice

Many Thanks