Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8943713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:50:55+00:00 2026-06-15T11:50:55+00:00

Working demo here: http://jsfiddle.net/8Q4Lf/3/ I am retrieving an array on json and storing it

  • 0

Working demo here: http://jsfiddle.net/8Q4Lf/3/

I am retrieving an array on json and storing it in a hidden input with this function:

$.post("http://"+ document.domain + baseUrl + "/tickets/getCategoryDepartmentRelation/",
    function(dat){
        $('#departmentsByCategory_array').val(JSON.stringify(dat));         
});

The call return this value:

{
    "Investigation Request": [
        "Client server",
        "Interface",
        "Engine"
    ],
    "Configure Planning": [
        "Interface",
        "Engine"
    ],
    "Bug Report": [
        "Client server",
        "Interface",
        "Engine",
        "Database"
    ],
    "Development Request": [
        "Interface",
        "Dev Management",
        "Database",
        "Client server",
        "Engine"
    ],
    "Suggestion Box": [
        "Dev Management"
    ],
    "Post Site Feedback": [
        "Web"
    ]
}

Which is the json representation of this array:

Array
(
    [Investigation Request] => Array
        (
            [0] => Client server
            [1] => Interface
            [2] => Engine
        )

    [Configure Planning] => Array
        (
            [0] => Interface
            [1] => Engine
        )

    [Bug Report] => Array
        (
            [0] => Client server
            [1] => Interface
            [2] => Engine
            [3] => Database
        )

    [Development Request] => Array
        (
            [0] => Interface
            [1] => Dev Management
            [2] => Database
            [3] => Client server
            [4] => Engine
        )

    [Suggestion Box] => Array
        (
            [0] => Dev Management
        )

    [Post Site Feedback] => Array
        (
            [0] => Web
        )

)

This fills the input with this data:

<input type="hidden" name="demo" value="{&quot;Investigation Request&quot;:[&quot;Client server&quot;,&quot;Interface&quot;,&quot;Engine&quot;],&quot;Configure Planning&quot;:[&quot;Interface&quot;,&quot;Engine&quot;],&quot; Bug Report&quot;:[&quot;Client server&quot;,&quot;Interface&quot;,&quot;Engine&quot;,&quot;Database&quot;],&quot; Development Request&quot;:[&quot;Interface&quot;,&quot;Dev Management&quot;,&quot;Database&quot;,&quot;Client server&quot;,&quot;Engine&quot;],&quot;Suggestion Box&quot;:[&quot;Dev Management&quot;],&quot;Ticket Site Feedback&quot;:[&quot;Web&quot;]}" id="departmentsByCategory_array">

I can get the full array with this:

$('#departmentsByCategory_array').val();

But I am trying to retrieve the values for only one element, for example “Configure Planning”.

How can I do it to play with those values inside Javascript or jQuery? (loop, compare…)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:50:56+00:00Added an answer on June 15, 2026 at 11:50 am
    var data = JSON.parse($('#departmentsByCategory_array').val());
    data['Configure Planning']; //returns Configure Planning array
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working on this demo chart http://jsfiddle.net/hcharge/G7rsh/ and I'm struggling to add flags
Here is my demo: http://jsfiddle.net/Gf9Bn/5/ From my demo, it's working fine in chrome, but
I'm having trouble selecting all contents of the div. Here's a demo: http://jsfiddle.net/KcX6A/304/ It's
Demo here: http://jsfiddle.net/auMd5/ I want the blue menu bar to stick to the top
i have this example found here: http://threedubmedia.com/code/event/drag/demo/resize2 and i tried to reproduce it in
http://jsfiddle.net/w6eqk/1/ I want to expand content to its height (not fixed). I've done this
I'm working through the Demo: Binding Data with the SqlDataSource of this pluralsight video
I'm working on a demo about collision detection. (Some of the code for this
I am using Slidesjs it working fine in below url http://www.mysoko.in/demo/Simple/ And same code
I made a simple responsive page using Twitter Bootstrap: http://jsfiddle.net/5YNmm/3/ The responsive Nav and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.