Hi @ferosekhan ,
I'm agree with Saravanan_Dharmaraj.
Here Exemple for lastModified property
You can use the below query it have "orderBy and orderby.sort" and it will return the results based on the last modify
http://localhost:4502/bin/querybuilder.json?type=cq:Page&orderby=@jcr:content/cq:lastModified&orderb...
Run the above url, you can change the host & port if you are useing diffrent and After run this you can review the JSON response.
Also if you want to test after modification then go to the below path in cxde and change
cq:lastModified property
Path: /conf/core-components-examples/settings/wcm/templates/content-page/policies/jcr:content

Then re-run your query and review the response you will able to see the updated response based on lastModified

Hope that helps!
Regards,
Abhi