check if key value exists in object array javascript