Below is a sample demonstration script written for AppleScript that does what you are looking for. It produces a list of the names of graphics where effective PPI is less than 299 or greater than 301 for both the x and y parameters. This can give you some ideas for your ExtendScript.

I've tried your suggestion but the outcome will open every document create list then closed then open another one create list then close again until the last indesign in a book. Is there a way that it will run first throughout the book then create only one list of images.

My code doesn't handle the creation of the list document at all, but if you want all images to be listed in one document, create that document before you start the loop and always write to it in the code.

Sorry, but I already had an AppleScript. Here is the script translated for JavaScript. It's coarse, I know but pretty much line for line. That way you can see how easy it is to translate from AppleScript to JavaScript and vice-versa. Script is not thoroughly tested either.

If you want to skip the code, just download a full working demo of FlightCheck. Drag-and-drop your InDesign file onto it. Look at the main window and see the "images" section. There you can sort by DPI and many other factors.