# JSON files

**URL:** https://www.finalbuilder.com/forums/t/json-files/2058
**Category:** Discussion
**Created:** [December 19, 2012, 11:44am UTC](https://www.finalbuilder.com/forums/t/json-files/2058 "2012-12-19T11:44:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ranch](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/r/bcef8e/32.png) [@ranch](https://www.finalbuilder.com/forums/u/ranch)
#### Post date: [December 19, 2012, 11:44am UTC](https://www.finalbuilder.com/forums/t/json-files/2058/1 "2012-12-19T11:44:17Z")

</div>

Hi all,

How can I parse JSON files? Something like XPath for JSON.

Cheers.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [December 19, 2012, 1:41am UTC](https://www.finalbuilder.com/forums/t/json-files/2058/2 "2012-12-19T01:41:00Z")

</div>

There are a few javascript based libraries that do something like xpath, I’m not sure if they could be used with Finalbuilder though as most of them depend on the existance of a browser window.   
  
Edit : Actually I did manage to get this one working by fudging the window object :   
  
[http://jslinq.codeplex.com/](http://jslinq.codeplex.com/)   
  
In the project global javascript, add this line :   
  
var window = new Object();  
Then in an action script event(javascript) this simple test worked for me :   
  
[code]//USEUNIT C:\Users\Vincent\Downloads\JSLINQ\_v2.10\_SourcePlusExamples\scripts\JSLINQ.jsvar myList = [{FirstName:“Chris”,LastName:“Pearson”},{FirstName:“Kate”,LastName:“Johnson”},{FirstName:“Josh”,LastName:“Sutherland”},{FirstName:“John”,LastName:“Ronald”},{FirstName:“Steve”,LastName:“Pinkerton”}];var exampleArray = JSLINQ(myList).Where(function(item){ return item.FirstName == “Chris”; }).OrderBy(function(item) { return item.FirstName; });alert(exampleArray.items[0].LastName);[/code]   
  
Note the UseUnit line needs to point to the path where the JSLINQ.js file lives on your machine.   
  
HTH.
