sample code to parse json name value pairs