Hi,
I've installed webhook and successfully receiving POST data.
The format I am receiving is below:
{"id"=>"56c6f177e5ffaa3bed000302", "urls"=>[], "phones"=>[], "emails"=>[{"type"=>"work", "value"=>"Test.white@example.com"}, {"type"=>"other", "value"=>"Test@example.com"}], "status"=>"Lead", "status_id"=>"56b40c6ab3467a787f0000d3", "total_pendings"=>0.0, "sales_closed_for"=>[], "tags"=>[], "custom_fields"=>[], "owner_id"=>"56c05896b3467a7563000030", "pending_deal"=>false, "type"=>"company", "first_name"=>"Test", "last_name"=>"Name", "company_name"=>"Test Inc.", "starred"=>false, "lead_source_id"=>"", "background"=>"", "job_title"=>"", "company_id"=>"56c6dbbfe5ffaa5e7e0003e4", "modified_at"=>2016-02-19 10:41:59 UTC, "created_at"=>2016-02-19 10:41:59 UTC, "address_list"=>[{"address"=>"", "city"=>"", "state"=>"", "zip_code"=>"", "country_code"=>""}], "photo_url"=>""}
I want to fetch id,urls etc. How do I fetch values? As it is not in the form of json.
Hello,
Thanks very much for getting in contact with your query, and apologies for the delay!
JSON is basically comprised of key-value pairs. The key is invariably a string, while the value can range from a string, number (integer or floating point number), boolean (true/false), or can also be a JSON object (collection of key-value pairs), or a JSON array (collection of JSON objects).
Here's some more info on JSON, and here's some tutorials on parsing it.
Hope this helps.
All the best,
Cillian