Chrome Developer Tools: Inspect JSON path and extract data quickly - TechBrij (2024)

Table of Contents
Video: Steps: Conclusion:
Sep 04, 2017

Do you want to query JSON document, extract data, select sub sections or testing a query quickly? This articles explains to do it using Chrome Developer tools. I am using Google Chrome Version 60.0.3112.113. But it should work for all recent versions.

Read Also: Copy DropDownList Data from a Website: Chrome Developer Tools

Video:

Here is demo video to show how to inspect JSON and extract data:

Steps:

1. Store As Global variable

It is easy to capture json web response in Network tab. Right click on the JSON object and select the 'Store as Global Variable' option which is going to create a variable tempX where X is going to be an integer (temp1, temp2 so on and so forth).

Chrome Developer Tools: Inspect JSON path and extract data quickly - TechBrij (1)2. Ctrl + Alt + click on arrow to auto expand object

To expand node and all its children, press Ctrl + Alt + click. Basically, we are going to search in JSON but it is available in visible content that's why we are expanding all nodes.

3. Search in JSON object

Ctrl + F to open search box, enter term to search in JSON. It is easy to get properties, we want to pick.

4. Copy property path

May be searched data at Nth level of hierarchy, so right click on property and click "Copy Property Path".

Chrome Developer Tools: Inspect JSON path and extract data quickly - TechBrij (2)

For verification, open console, type the temp variable and paste the property path, you must get the expected result.

Suppose the Global variable is "temp1" and copied property path is "[0].name" then the below expression should return the expected result

temp1[0].name 

5. Code to extract data in console

Chrome developer tools supports ES6 arrow functions so we are going to use it with array map function

To get list of all names

temp1.map(function(i) {return i.name; })

or

temp1.map((i) => { return i.name})

or

temp1.map(i => i.name)

all will return the same result.

Chrome Developer Tools: Inspect JSON path and extract data quickly - TechBrij (3)

Let's pick name and screen_name properties in tabular format:

console.table(temp1.map((j) => { return { name : j.name, screenName : j.screen_name}}))

Chrome Developer Tools: Inspect JSON path and extract data quickly - TechBrij (4)

Conclusion:

In this article, we saw how easy is to query JSON object and extract data in Chrome Developer Tools. Also, explored "Store as Global Variable" and "Copy property path" features. Hope, it saves your bunch of time.

Chrome Developer Tools: Inspect JSON path and extract data quickly - TechBrij (2024)
Top Articles
22 Ways to Treat Yo' Self Without Spending Money
Protecting Your Family and Finances with Haven Life Insurance
Myexperience Login Northwell
How Many Cc's Is A 96 Cubic Inch Engine
Air Canada bullish about its prospects as recovery gains steam
Health Benefits of Guava
Craigslist Furniture Bedroom Set
Hello Alice Business Credit Card Limit Hard Pull
Zendaya Boob Job
Babyrainbow Private
Https E24 Ultipro Com
Simon Montefiore artikelen kopen? Alle artikelen online
Otterbrook Goldens
Cyndaquil Gen 4 Learnset
111 Cubic Inch To Cc
Dirt Removal in Burnet, TX ~ Instant Upfront Pricing
R Personalfinance
Copart Atlanta South Ga
Drago Funeral Home & Cremation Services Obituaries
Td Small Business Banking Login
What Is Vioc On Credit Card Statement
Evil Dead Rise Showtimes Near Pelican Cinemas
Greyson Alexander Thorn
Construction Management Jumpstart 3Rd Edition Pdf Free Download
Dtm Urban Dictionary
Mta Bus Forums
Lacey Costco Gas Price
Restaurants In Shelby Montana
Truvy Back Office Login
They Cloned Tyrone Showtimes Near Showbiz Cinemas - Kingwood
HP PARTSURFER - spare part search portal
Google Flights To Orlando
My Dog Ate A 5Mg Flexeril
Christmas Days Away
Swimgs Yuzzle Wuzzle Yups Wits Sadie Plant Tune 3 Tabs Winnie The Pooh Halloween Bob The Builder Christmas Autumns Cow Dog Pig Tim Cook’s Birthday Buff Work It Out Wombats Pineview Playtime Chronicles Day Of The Dead The Alpha Baa Baa Twinkle
What does wym mean?
Uhaul Park Merced
A Comprehensive 360 Training Review (2021) — How Good Is It?
The Listings Project New York
511Pa
Electric Toothbrush Feature Crossword
Dwc Qme Database
Hovia reveals top 4 feel-good wallpaper trends for 2024
QVC hosts Carolyn Gracie, Dan Hughes among 400 laid off by network's parent company
Deepwoken: How To Unlock All Fighting Styles Guide - Item Level Gaming
Grand Valley State University Library Hours
Noh Buddy
Embry Riddle Prescott Academic Calendar
Noga Funeral Home Obituaries
Horseneck Beach State Reservation Water Temperature
Hsi Delphi Forum
Hampton Inn Corbin Ky Bed Bugs
Latest Posts
Article information

Author: Rev. Leonie Wyman

Last Updated:

Views: 6574

Rating: 4.9 / 5 (79 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Rev. Leonie Wyman

Birthday: 1993-07-01

Address: Suite 763 6272 Lang Bypass, New Xochitlport, VT 72704-3308

Phone: +22014484519944

Job: Banking Officer

Hobby: Sailing, Gaming, Basketball, Calligraphy, Mycology, Astronomy, Juggling

Introduction: My name is Rev. Leonie Wyman, I am a colorful, tasty, splendid, fair, witty, gorgeous, splendid person who loves writing and wants to share my knowledge and understanding with you.