Php Get Array Of Object In Js Syntax If Statement