take out json parse in js