use JSON qw(decode_json); my $jsonString = '{ "_id" : "ObjectId(52dfd2750cf2169251fe8d3c)", "closed_on": "ISODate(2014-01-30T18:30:00Z)", "companies": [ { "_id": "ObjectId(52dfd2750cf2169251fe8d3f)", "comp_name": "Test1" }, { "_id": "ObjectId(52dfd7950cf2169251fe8d47)", "comp_name": "Test2" } ], "contacts" : [ { "_id": "ObjectId(52dfd2750cf2169251fe8d3e)", "fname": "Solve", "lname": "Scottt", "email": "email1@gmail.com", "company": "Test111" }, { "_id": "ObjectId(52dfd7950cf2169251fe8d46)", "fname": "signe", "lname": "towne", "email": "email2@gmail.com", "company": "Test222" } ], "crt_by": "creator@gmail.com", "currency": "USD", "type": "None" }'; my $decodedJSON = decode_json($jsonString); print "crts_by = $decodedJSON->{'crt_by'}\n"; print "Contact 1 => fname = $decodedJSON->{'contacts'}[0]{'fname'}, company = $decodedJSON->{'contacts'}[0]{'company'}\n";