Generate an html table with sorting functionality from given JSON array of objects. Each headings will be Generated and values tabulated correspondingly