Solved
Create a Servlet to extract JSON in a path where aem nodes have property name country mexico in the form of JSON Array
I need to create a servlet that whenever we write infinity.json the product whose properties has country mexico all Products should appear in json array.