Mysql Find Substring Javascript Mdn Array Sort Method