🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 147 (from laksa066)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

đź“„
INDEXABLE
âś…
CRAWLED
23 hours ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://www.tutorialrepublic.com/faq/how-to-load-local-json-file-using-jquery.php
Last Crawled2026-04-16 15:32:23 (23 hours ago)
First Indexed2020-04-29 19:59:30 (5 years ago)
HTTP Status Code200
Meta TitleHow to Load Local JSON File Using jQuery
Meta Descriptionnull
Meta Canonicalnull
Boilerpipe Text
Advertisements Topic: JavaScript / jQuery Prev | Next Answer: Use the jQuery $.getJSON() Method You can simply use the $.getJSON() method to load local JSON file from the server using a GET HTTP request. If the JSON file contains a syntax error, the request will usually fail silently. Let's try out the following example to understand how it basically works: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery Loading Local JSON File</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> </head> <body> <script> $(document).ready(function(){ $.getJSON("test.json", function(data){ console.log(data.name); // Prints: Harry console.log(data.age); // Prints: 14 }).fail(function(){ console.log("An error has occurred."); }); }); </script> </body> </html> The "test.json" file contains a simple JSON string {"name": "Harry", "age": 14} . Related FAQ Here are some more FAQ related to this topic: How to parse JSON in JavaScript How to convert JavaScript object to JSON string How to check if an object property is undefined in JavaScript Advertisements
Markdown
[![TutorialRepublic](https://www.tutorialrepublic.com/lib/images/logo.svg)](https://www.tutorialrepublic.com/) [HOME](https://www.tutorialrepublic.com/ "Home Page") [HTML5](https://www.tutorialrepublic.com/html-tutorial/ "HTML Tutorial") [CSS3](https://www.tutorialrepublic.com/css-tutorial/ "CSS Tutorial") [JAVASCRIPT](https://www.tutorialrepublic.com/javascript-tutorial/ "JavaScript Tutorial") [JQUERY](https://www.tutorialrepublic.com/jquery-tutorial/ "jQuery Tutorial") [BOOTSTRAP5](https://www.tutorialrepublic.com/twitter-bootstrap-tutorial/ "Bootstrap 5 Tutorial") [v4.6](https://www.tutorialrepublic.com/twitter-bootstrap-4-tutorial/ "Bootstrap 4.6 Tutorial") [PHP7](https://www.tutorialrepublic.com/php-tutorial/ "PHP Tutorial") [SQL](https://www.tutorialrepublic.com/sql-tutorial/ "SQL Tutorial") [REFERENCES](https://www.tutorialrepublic.com/references.php "Web References") [EXAMPLES](https://www.tutorialrepublic.com/practice-examples.php "Practice Examples and Demos") [FAQ](https://www.tutorialrepublic.com/faq.php "Frequently Asked Questions and Answers") [SNIPPETS](https://www.tutorialrepublic.com/snippets/gallery.php "Bootstrap Code Snippets") [Online HTML Editor](https://www.tutorialrepublic.com/codelab.php) WEB TUTORIALS [HTML Tutorial](https://www.tutorialrepublic.com/html-tutorial/) [CSS Tutorial](https://www.tutorialrepublic.com/css-tutorial/) [JavaScript Tutorial](https://www.tutorialrepublic.com/javascript-tutorial/) [jQuery Tutorial](https://www.tutorialrepublic.com/jquery-tutorial/) [Bootstrap Tutorial](https://www.tutorialrepublic.com/twitter-bootstrap-tutorial/) [PHP Tutorial](https://www.tutorialrepublic.com/php-tutorial/) [SQL Tutorial](https://www.tutorialrepublic.com/sql-tutorial/) PRACTICE EXAMPLES [HTML Examples](https://www.tutorialrepublic.com/html-examples.php) [CSS Examples](https://www.tutorialrepublic.com/css-examples.php) [JavaScript Examples](https://www.tutorialrepublic.com/javascript-examples.php) [jQuery Examples](https://www.tutorialrepublic.com/jquery-examples.php) [Bootstrap Examples](https://www.tutorialrepublic.com/twitter-bootstrap-examples.php) [PHP Examples](https://www.tutorialrepublic.com/php-examples.php) HTML REFERENCES [HTML Tags/Elements](https://www.tutorialrepublic.com/html-reference/html5-tags.php) [HTML Global Attributes](https://www.tutorialrepublic.com/html-reference/html5-global-attributes.php) [HTML Event Attributes](https://www.tutorialrepublic.com/html-reference/html5-event-attributes.php) [HTML Color Picker](https://www.tutorialrepublic.com/html-reference/html-color-picker.php) [HTML Language Codes](https://www.tutorialrepublic.com/html-reference/html-language-codes.php) [HTML Character Entities](https://www.tutorialrepublic.com/html-reference/html-character-entities.php) [HTTP Status Codes](https://www.tutorialrepublic.com/html-reference/http-status-codes.php) CSS REFERENCES [CSS At-rules](https://www.tutorialrepublic.com/css-reference/css-at-rules.php) [CSS Properties](https://www.tutorialrepublic.com/css-reference/css3-properties.php) [CSS Animatable Properties](https://www.tutorialrepublic.com/css-reference/css-animatable-properties.php) [CSS Color Values](https://www.tutorialrepublic.com/css-reference/css-color-values.php) [CSS Color Names](https://www.tutorialrepublic.com/css-reference/css-color-names.php) [CSS Web Safe Fonts](https://www.tutorialrepublic.com/css-reference/css-web-safe-fonts.php) [CSS Aural Properties](https://www.tutorialrepublic.com/css-reference/css-aural-properties.php) PHP REFERENCES [PHP Array Functions](https://www.tutorialrepublic.com/php-reference/php-array-functions.php) [PHP String Functions](https://www.tutorialrepublic.com/php-reference/php-string-functions.php) [PHP File System Functions](https://www.tutorialrepublic.com/php-reference/php-file-system-functions.php) [PHP Date/Time Functions](https://www.tutorialrepublic.com/php-reference/php-date-and-time-functions.php) [PHP Calendar Functions](https://www.tutorialrepublic.com/php-reference/php-calendar-functions.php) [PHP MySQLi Functions](https://www.tutorialrepublic.com/php-reference/php-mysqli-functions.php) [PHP Filters](https://www.tutorialrepublic.com/php-reference/php-filters.php) [PHP Error Levels](https://www.tutorialrepublic.com/php-reference/php-error-levels.php) Advertisements # How to Load Local JSON File Using jQuery Topic: [JavaScript / jQuery](https://www.tutorialrepublic.com/faq.php#javascript-jquery)[Prev](https://www.tutorialrepublic.com/faq/how-to-convert-utc-date-time-to-local-date-time-in-javascript.php)\|[Next](https://www.tutorialrepublic.com/faq/how-to-trigger-a-click-on-a-link-using-jquery.php) ## Answer: Use the jQuery `$.getJSON()` Method You can simply use the `$.getJSON()` method to load local JSON file from the server using a GET HTTP request. If the JSON file contains a syntax error, the request will usually fail silently. Let's try out the following example to understand how it basically works: #### Example [Try this code »](https://www.tutorialrepublic.com/codelab.php?topic=faq&file=jquery-load-local-json-file "Try this code using online Editor") ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery Loading Local JSON File</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> </head> <body> <script> $(document).ready(function(){ $.getJSON("test.json", function(data){ console.log(data.name); // Prints: Harry console.log(data.age); // Prints: 14 }).fail(function(){ console.log("An error has occurred."); }); }); </script> </body> </html> ``` The "test.json" file contains a simple JSON string `{"name": "Harry", "age": 14}`. *** ## Related FAQ Here are some more FAQ related to this topic: - [How to parse JSON in JavaScript](https://www.tutorialrepublic.com/faq/how-to-parse-json-in-javascript.php) - [How to convert JavaScript object to JSON string](https://www.tutorialrepublic.com/faq/how-to-convert-js-object-to-json-string.php) - [How to check if an object property is undefined in JavaScript](https://www.tutorialrepublic.com/faq/how-to-check-if-an-object-property-is-undefined-in-javascript.php) [Previous Page](https://www.tutorialrepublic.com/faq/how-to-convert-utc-date-time-to-local-date-time-in-javascript.php) [Next Page](https://www.tutorialrepublic.com/faq/how-to-trigger-a-click-on-a-link-using-jquery.php) Advertisements [![Bootstrap UI Design Templates](https://www.tutorialrepublic.com/lib/images/bootstrap-code-snippets.png)](https://www.tutorialrepublic.com/snippets/gallery.php) [![Property Marvels - A Leading Real Estate Portal for Premium Properties](https://www.tutorialrepublic.com/lib/images/propertymarvels.png)](https://www.propertymarvels.com/) Advertisements Is this website helpful to you? Please give us a [like](https://www.tutorialrepublic.com/like.php), or share your [feedback](https://www.tutorialrepublic.com/contact-us.php) *to help us improve*. Connect with us on [Facebook](https://www.facebook.com/tutorialrepublic) and [Twitter](https://twitter.com/tutrepublic) for the latest updates. #### About Us [Our Story](https://www.tutorialrepublic.com/about-us.php) [Terms of Use](https://www.tutorialrepublic.com/terms-of-use.php) [Privacy Policy](https://www.tutorialrepublic.com/privacy-policy.php) #### Contact [Contact Us](https://www.tutorialrepublic.com/contact-us.php) [Report Error](https://www.tutorialrepublic.com/contact-us.php) [Advertise](https://www.tutorialrepublic.com/advertise-with-us.php) #### Interactive Tools [Bootstrap Icon Search Utility](https://www.tutorialrepublic.com/bootstrap-icons-classes.php) [HTML Formatter](https://www.tutorialrepublic.com/html-formatter.php) [Title & Meta Length Calculator](https://www.tutorialrepublic.com/faq/what-is-the-maximum-length-of-title-and-meta-description-tag.php) [HTML Color Picker](https://www.tutorialrepublic.com/html-reference/html-color-picker.php) [Bootstrap Button Generator](https://www.tutorialrepublic.com/twitter-bootstrap-button-generator.php) [SQL Playground](https://www.tutorialrepublic.com/codelab.php?topic=sql&file=select-all) [Font Awesome Icon Finder](https://www.tutorialrepublic.com/font-awesome-icons-classes.php) [HTML Editor](https://www.tutorialrepublic.com/codelab.php?topic=html&file=hello-world) ![TutorialRepublic](https://www.tutorialrepublic.com/lib/images/logo.svg) [![BMC](https://www.tutorialrepublic.com/lib/images/bmc-btn.png)](https://www.buymeacoffee.com/tutrepublic) Copyright © 2026 Tutorial Republic. All Rights Reserved. *Share This:*
Readable Markdown
Advertisements Topic: [JavaScript / jQuery](https://www.tutorialrepublic.com/faq.php#javascript-jquery)[Prev](https://www.tutorialrepublic.com/faq/how-to-convert-utc-date-time-to-local-date-time-in-javascript.php)\|[Next](https://www.tutorialrepublic.com/faq/how-to-trigger-a-click-on-a-link-using-jquery.php) ## Answer: Use the jQuery `$.getJSON()` Method You can simply use the `$.getJSON()` method to load local JSON file from the server using a GET HTTP request. If the JSON file contains a syntax error, the request will usually fail silently. Let's try out the following example to understand how it basically works: ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery Loading Local JSON File</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> </head> <body> <script> $(document).ready(function(){ $.getJSON("test.json", function(data){ console.log(data.name); // Prints: Harry console.log(data.age); // Prints: 14 }).fail(function(){ console.log("An error has occurred."); }); }); </script> </body> </html> ``` The "test.json" file contains a simple JSON string `{"name": "Harry", "age": 14}`. *** ## Related FAQ Here are some more FAQ related to this topic: - [How to parse JSON in JavaScript](https://www.tutorialrepublic.com/faq/how-to-parse-json-in-javascript.php) - [How to convert JavaScript object to JSON string](https://www.tutorialrepublic.com/faq/how-to-convert-js-object-to-json-string.php) - [How to check if an object property is undefined in JavaScript](https://www.tutorialrepublic.com/faq/how-to-check-if-an-object-property-is-undefined-in-javascript.php) Advertisements
Shard147 (laksa)
Root Hash13123960086470146547
Unparsed URLcom,tutorialrepublic!www,/faq/how-to-load-local-json-file-using-jquery.php s443