Updated the JPQL to retrun json array