If I have a static json file on my server, is it possible to extract only the required section of the json data using javascript without downloading the whole json file?
I understand that I can use serverside technologies to dynamically generate json data to based on what I want, but I just wanted to know if javascript can be used to extract data from a server json file without downloading the whole thing?
No, you can’t do this client side as the browser called by javascript can only fetch a whole file.
If you really need to get only part of the file, you’ll have to build server side code.
But check before by profiling that you need to do this optimization. And don’t forget that fetching only part of a file would prevent the file from being cached and reused as a whole.