Using json to pass values from child to parent