If Condition In Array Of Objects Javascript