Js Find Index In Array Of Structures Matlab