# working with files json

**URL:** <https://community.wolfram.com/t/working-with-files-json/3203>\
**Category:** Questions\
**Tags:** authoring-and-publishing, computer-science, data-science, education, engineering, game-development, image-processing, fun-and-play, software-development\
**Created:** [September 6, 2014, 2:07am UTC](https://community.wolfram.com/t/working-with-files-json/3203 "2014-09-06T02:07:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![22padrinos](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/22padrinos/32/29645_2.png) [@22padrinos](https://community.wolfram.com/u/22padrinos)\
**Post date:** [September 6, 2014, 2:07am UTC](https://community.wolfram.com/t/working-with-files-json/3203/1 "2014-09-06T02:07:15Z")

</div>

Hi, folks.  
I am trying to extract parts of a file json, I want a list like the following

```
{"uri" -> "http://community.wolfram.com/dashboard", 
 "uri" -> "http://www.online-convert.com/es/resultado/d7b9f49e6e811d16d321b597ff024cc4", 
 "uri" -> "https://www.youtube.com/watch?v=_yBxQXombCw", "https://www.youtube.com/watch?v=mFN73-PQX6I", 
 "uri" -> "https://www.youtube.com/watch?v=P0FxZUrIB5M"}

```

where they are all uris, in the list that I put for example are some, the problem is that I have tried several ways but I have not been able to, I hope that someone can help me.

Here are the steps of my last attempt to try to do my task but I did not obtain success.

```
impjas = Import[
   "C:\Documents and Settings\luis\Mis \n documentos\bookmarks-2014-09-05.json"];
base = ToString[impjas];

caseshttp = StringCases[base, "http://" ~~ ___];
In[5]:= StringPosition[caseshttp, "http://" ~~ ___]

Out[5]= {{{1, 29207}, {246, 29207}, {483, 29207}, {659, 29207}, {1060,
    29207}, {1230, 29207}, {7391, 29207}, {10765, 29207}, {11773, 
   29207}, {12359, 29207}, {12534, 29207}}}

caseshttp[[1, 29207]]
Part::partd: Part specification {<<29211>>}[[1,29207]] is longer than depth of object. >>

```

Thanks in advance,Luis.  
Attach my file .json

---

<div class="post-metadata">

**Author:** ![dreiss](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/dreiss/32/29094_2.png) [@dreiss](https://community.wolfram.com/u/dreiss)\
**Post date:** [September 6, 2014, 6:42pm UTC](https://community.wolfram.com/t/working-with-files-json/3203/2 "2014-09-06T18:42:29Z")

</div>

Use Cases:

```
In[65]:= jsonImport = 
 Import["/Users/dreiss/Downloads/bookmarks-2014-09-05.json"];

In[70]:= Cases[jsonImport, z : ("uri" -> _) :> z, [Infinity]]

Out[70]= {"uri" -> "http://community.wolfram.com/dashboard", 
 "uri" -> "http://www.online-convert.com/es/resultado/\n d7b9f49e6e811d16d321b597ff024cc4", 
 "uri" -> "http://www.spanishdict.com/traductor", 
 "uri" -> "https://www.youtube.com/watch?v=18AIszvxESo", 
 "uri" -> "https://www.youtube.com/watch?v=s-6sMhBH09c", 
 "uri" -> "https://www.youtube.com/watch?v=vFe-R-D9Kig", 
 "uri" -> "https://www.youtube.com/watch?v=6OLOw0EhTBo", 
 "uri" -> "https://www.youtube.com/watch?v=c1gRxQLjjFo", 
 "uri" -> "https://www.youtube.com/watch?v=UjWuOtHGJck", 
 "uri" -> "https://www.youtube.com/watch?v=dDD-x2ncgRk", 
 "uri" -> "https://www.youtube.com/watch?v=ZK0w-vxC2Vo", 
 "uri" -> "https://www.youtube.com/watch?v=B1kL6V-wGy0", 
 "uri" -> "https://www.youtube.com/watch?v=zjUgBGUCMpA", 
 "uri" -> "http://home.comcast.net/~djmpark/index.html#poemlist", 
 "uri" -> "https://www.youtube.com/watch?v=2U_Ln6RUIlU", 
 "uri" -> "https://www.youtube.com/watch?v=4jwMznbBP3M", 
 "uri" -> "https://www.youtube.com/watch?v=As9DnNT3XZA", 
 "uri" -> "https://www.youtube.com/watch?v=xMye-iuQ5Xw", 
 "uri" -> "https://www.youtube.com/watch?v=P0FxZUrIB5M", 
 "uri" -> "place:sort=8&maxResults=10", 
 "uri" -> "http://www.mozilla.com/en-US/firefox/central/", 
 "uri" -> "https://www.youtube.com/watch?v=XmF-eYzka9w", 
 "uri" -> "https://www.youtube.com/watch?v=mFN73-PQX6I", 
 "uri" -> "http://sunsite.univie.ac.at/Mozart/dice/", 
 "uri" -> "https://www.youtube.com/watch?v=_yBxQXombCw", 
 "uri" -> "https://www.youtube.com/watch?v=uH_AZCOhihA"}

```
