Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Sending the Data from Angularjs in the form of JSON as below

Object {data: "stdClass Object↵(↵ [0] => B↵ [vin] => vin123…[value] => Gambia↵ [country_name] => Gambia↵)↵", status: 200, headers: function, config: Object}

Then in php how to access only the data in that Object Json i.e data->0, data->vin etc...........

share|improve this question
    
use the response of this question –  Bassem Jun 25 at 15:41

1 Answer 1

Simply use json_decode() as it is a standard PHP function that transforms your serialized JSON object into a php array, that you then can use in php.

If you want an object representation, you may hydrate that object with data from that array.

share|improve this answer
    
i want the data from the Object, how to access it. Even we have status, header, config etc.. different properties is there. How to access data Only –  user1153130 Jun 26 at 4:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.