JS no longer expects bare JSON arrays from API

anyplace where the PHP endpoints were returning a top-level array,
Flask should return an object with the key “results” and the array as
its value.

this is done because Flask does not allow bare arrays to be returned as
JSON.