Javascript Create Array From List Of Objects To Draw