I want to return from JSON object "mail" for "name" which will be definie by variable C.
var c = "product3"
var text = '{"products":[' +
'{"name":"product1","mail":"[email protected]" },' +
'{"name":"product2","mail":"[email protected]" },' +
'{"name":"product3","mail":"[email protected]" }]}';
In this case i want to return product3 [email protected]