Filter JSON multidimensional array

I have this multidimensional JSON array which is stringified and saved in localstorage as 'json_news' (see attached). I also have a category slug stored to localstorage as 'category_slug' (e.g. 'year-1').

I need to filter 'json_news' to return an array to local storage as 'filtered_news' with the same structure as 'json_news' but with only those posts included that contain an entry under "categories" that has a 'slug' which matches 'category_slug'.

NOTE: This solution must be done with javascript. It is for a phonegap app.

UPDATE: I have updated the json_news file to include more example posts with other categories.

Evner: HMLT5, jQuery / Prototype

Se mere: json array filter, local storage, json, json c, category filter html, jquery storage, jquery category, filter category, filter html, json html, decode multidimensional json array php, prototype json, category filter, jquery filter, cart filter filtered, filter posts, dealing storage structure integers array digits , json jquery prototype, html json array, jquery json html, json array javascript array, year filter, html json, dealing use different storage structure integers linked lists, json array

Om arbejdsgiveren:
( 24 bedømmelser ) Acrefair, United Kingdom

Projekt ID: #6015124

Tildelt til:


Hi , I have made php script , check [url removed, login to view] , this script read your json file and clean categories array and show only "year-1" , for this demo I made download option but for your finaly I wil Flere

£13 GBP in 0 dage
(18 bedømmelser)

6 freelancers are bidding on average £15 for this job


A proposal has not yet been provided

£12 GBP på 1 dag
(9 bedømmelser)

I did json array filtering in others project of mine, being a very common thing using json array of objects... ready to start the work.. it will be ready by tomorrow... waiting your answer...

£13 GBP på 1 dag
(2 bedømmelser)

Hi, do you want to do it using only jquery, I can do it and deliver within minutes. Just send me some category data, and if available html to insert in.

£20 GBP på 1 dag
(2 bedømmelser)

Hi. I have over 8 years experiences in html programming. I read about your job in detail and understood all. I want to work with you and I can start immediately. You will be received high quality result with very l Flere

£23 GBP på 1 dag
(1 bedømmelse)

Hi, I have 5+ years of experience in software development. I have read your requirement and I can work on it Please let me know if interested. Thanks, Bhupinder Skyp- coderoach

£10 GBP in 2 dage
(0 bedømmelser)