Getting json path

I have the following JSON snippet
quote:
"navigation": [
"section": [
"name": "activities"
"menus": [
"menuitem": [
"id": "91632"
"order": "9"
"parent": "0"
"text": "News Items"
"target": "_self"
"link": "
http://192.168.0.1:90/news/index.php"
"submenus": [
"menuitem": [
"id": "45234"
"order": "1"
"parent": "91632"
"text": "Add News Item"
"target": "_self"
"link": "
http://192.168.0.1:90/news/index.php?action=set_news"
"submenus": ""
"menuitem": [
"id": "54231"
"order": "1"
"parent": "29842"
"text": "Add Event"
"target": "_self"
"link": "
http://192.168.0.1:90/events/index.php?action=set_events"
"submenus": [
"menuitem": [
"id": "45234"
"order": "1"
"parent": "91632"
"text": "Add News Item"
"target": "_self"
"link": "
http://192.168.0.1:90/news/index.php?action=set_news"
"submenus": [
"menuitem": [
"id": "29842"
"order": "8"
"parent": "0"
"text": "View Events"
"target": "_self"
"link": "
http://192.168.0.1:90/events/index.php"
"submenus": [
"menuitem": [
"id": "54231"
"order": "1"
"parent": "29842"
"text": "Add Event"
"target": "_self"
"link": "
http://192.168.0.1:90/events/index.php?action=set_events"
"submenus": ""
I'm using the JSONDataSet and NestedJSON to get the section,
the sections menus, and the menus submenus
I'm trying to replicate the spry's menubar widget structure
thus i have
quote:
var mainMenus = new Spry.Data.JSONDataSet("taskmenu.js",
{path:"navigation"});
var menus = new Spry.Data.NestedJSONDataSet(mainMenus,
"section.menus");
var subMenus = new Spry.Data.NestedJSONDataSet(mainMenus,
"menus.menuitem.submenus");
<ul id="MenuBar2" class="MenuBarHorizontal"
spry:region="mainMenus menus subMenus">
<li spry:repeat="mainMenus">
<a href="#">{menus::text}</a>
<ul spry:repeat="menus">
<li spry:if="{subMenus::menuitem.parent} ==
{menus::id}"><a href="#">{menus::text} +</a>
<ul spry:repeat="subMenus"><li
spry:if="{subMenus::menuitem.parent} == {menus::id}"><a
href="#">{subMenus::menuitem.text}
-</a></li></ul>
</li>
</ul>
</li>
</ul>
But I am not sure what the "notation path" is for the dataset
as nothing seems to print.
Wha would be my dot notation path to access the values?

yes i have....and while i haved followed the example my JSON
structure is WAY more complex...
i have
quote:
navigation -
- - section (repeating node)
-- - menus
--- - menuitem (repeating node)
----- submenus
------ menuitem (repeating node)
I dunno maybe my JSON structure needs to be
re-structured....can you suggest a structure to use to get a
similar output listing for a menubar widget?

Similar Messages

  • How can I get the path name and rename it?

    I Hope someone who knows more about automator than I can help me out here. What I'm trying to do is get the path file name, while also changing part of it. Here is my example:
    I can get the path name with this "Get Path" script I found http://automatorworld.com/archives/get-path/all-comments/
    It does half the job so I just need to tweak it but know how. When I get the path this is what I'll get: /Volumes/Public/Creative Services/Campaigns/2010/NCDDiv-32CDV Upgrade/NCDDIV-32Versions.xls
    I need to remove the beginning part"/volumes" to "file://///nhmanmkt01"
    This is so I can send the path from our sever where we keep our files to my windows friends so they can open it.
    Thanks for any help you can provide!

    ok, make the following workflow.
    1. get selected finder items.
    2. run shell script
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    for f in "$@"
    do
    echo "$f"|sed 's%/Volumes%file://///nhmanmkt01%'
    done</pre>
    set the script to accept input as arguments
    3. copy to clipboard
    save it as a finder plugin.

  • Get current path in Java LINUX?

    Hi,
    I m trying to get the current path of file using the getAbsolutePath.Its works fine (gets the current working directory) in Windows both in debug & release mode.Whereas, in LINUX ,It is not working.
    i.e.,It gets home path instead current path while running in release(by clicking jar file).
    File objfile = new java.io.File("SampleCloud.txt").getAbsoluteFile();
    JOptionPane.showMessageDialog(null, objfile.getAbsolutePath());
    Message box display home path instead of current path on linux.
    I dont know why its so.Ur help would be appreciated.
    System.getProperty("user.dir")
    I used it but its also taking the home dir path on linux
    Sonal
    Edited by: 850979 on 13-Apr-2011 06:04

    Thanks for your reply.
    I have copied the .jar file in a new directory under <user name>/Documents. The SampleRTLCloud.txt is also in the same directory. How do I get the path of the directory where the application is run from?
    Your help will be much appreciated.
    Sonal

  • How to get JSON item in web service workflow?

    Im tried to get json item in workflow,But was unable to obtain "RtnCode",how to do it?
    This my JSON,
    "MerchantID": "1032017",
    "RtnCode": "2",
    "RtnMsg": "Get Succeeded",
    My workflow :
    Get RtnCodefrom
    Variable: DealItems
    Error code:
    RequestorId: f85b0795-6682-fde7-0000-000000000000.
    Details: An unhandled exception occurred during the execution of the workflow instance.
    Exception details: System.InvalidOperationException: Looking up a value using a key is not supported on an instance of 'Microsoft.Activities.Dynamic.DynamicPrimitive'. at Microsoft.Activities.Dynamic.DynamicItem.TryGetValue(String key, DynamicItem&
    value) at Microsoft.Activities.Dynamic.DynamicValueBuilder.PathSegmentFactory.ObjectPathSegment.Get(DynamicItem obj) at Microsoft.Activities.GetDynamicValueProperty`1.Execute(CodeActivityContext context) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance
    instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity
    GetDynamicValueProperty<String> Start Sequence Flowchart Sequence Pay.WorkflowXaml_07f732da_c82a_4234_abd5_34c32c637413

    Hi Felaray,
    I have a similar issue and what I tried to do is to install JSON.NET in my project and used the "Assign" activity (under "Primitives" category on the toolbox) to assign the string to an object:
    Newtonsoft
    .Json.JsonConvert.DeserializeObject(resultFromCustomActivity)
    but unfortunately did not work. I am getting this exception:
    Visual Studio 2013 Workflow: Failed to translate expression because of the following error: Translating the method or one of its overloads to an activity is not supported
    If you cannot really change the source header, you might need to create a code custom activity and pass in your string and use JSON.NET, parse it and return what you want.
    Another "easier" option might involve doing some nasty parsing (using the Assign Activity) by finding the index of your "RntCode:" and getting the next set of characters before the comma. Since the .NET classes to utilize are limited
    it would be worth trying to use a RegEx
    resultFromCustomActivity
    .Substring(0,
    10)

  • How can i get the path to config folder placed inside the jar file?

    Hi i have developed an RCP application using eclipse.
    In my application config directory is there.
    When i export my RCP application as JNLP Project the jar file is created which contains config folder inside it.
    When i download the application using java web start , how can i get the path to config folder placed inside the jar file?
    Will the config folder exists in local cache in my system?
    Help needed.
    -Deepak

    -- This works in CS6:
    tell application "Adobe InDesign CS6"
      set myDocument to active document
      set selectedRectangles to selection of myDocument
      set theGraphicsLink to file path of item link of (graphic 1 of (item 1 of selectedRectangles))
    --> "Macintosh HD:folder/folder/filename.tif"
    end tell

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to get the path of local folder in native services in windows phone 8.1 ?

    I used to get the path of local folder path in managed code by following -Windows.Storage.StorageFolder localFolder = Windows.Storage.ApplicationData.Current.LocalFolder;But now I need to get the local folder path in native services .Please help me out ?

    What do you mean by "native services"? Windows.ApplicationData.Lo alFolder is the way to access the local folder.

  • How to get the Path of the Current File using Import & Export File -Reg.

    Dear all,
    I have a mega (big) doubt. I have manually inserted the Figures from the figure folders. Now i need, fully automated. So How can I get the Figure path
    Example :
    PMString path = "E://development/Figures/";
    now i checked, How many subFolders is there in "path", get the All Subfolders and check to the Article Name.
    Example
    Article Name == subFolder name then get the Files from the SubFolders(E://development/Figures/ChapterF/*.eps files").
    now I paste the Document using to For Loop.
    Please any one can suggest me, How can We get the Path in SDK.
    Note:
    Should I have to create the relative path by myself?
    No method supplied in SDK to do this directly?
    Please I need a help of this Query as soon as posible.
    Thanks & Regards
    T.R.Harihara SudhaN

    http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_file.asp?frame=true
    When a file is uploaded, the file name is also submitted. The path of the file is available only to the machine within the Local Machine security zone. The value property returns only the file name to machines outside the Local Machine security zone. See About URL Security Zones for more information on security zones.
    i need to know on how to get the compelete path /directory of the filename
    using <input type="file"> tag You can't. Its a security thing.
    is there any other way to get an input file from a local host aside from <input type="file"> tag?No. Not using just html.
    You could always go into activex components, but thats different again.
    Cheers,
    evnafets

  • To Get The Path of A File

    hi
    i wanted to get the path of the file.i just need to get the path not the file.i wanted to do using swing.may be filechooser or tree. but i need to know how could i get tht if i know the exampl for this it would be useful for me ..

    i need it in a way that like in windows explore.. so tht if i get the path of it i can use that in another class file.
    anyway i am looking out in File class also.

  • How to get the Path of the WebDynpro page

    Hi All,
    Can any one say how to get the path of the JSPDynPage ina Portlet in Portal Application.
    Becoz i have to display that Page in another JSPDynPagee
    Thanks in Advance....

    Hi,
    You can call your JSPDynPage component by calling the URL as:
    http://localhost:50000/irj/servlet/prt/portal/prtroot/YourApplicationName.YourComponentName
    Check this:
    Calling portal component
    Greetings,
    Praveen Gudapati
    [Points are welcome for helpful answers]

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • How to get the path of my java dir in java?

    Hi,
    I want to get dir path in java.
    I want to know from where I'm runing in the computer
    somthing like this?
    String osUserName = System.getenv("????????");
    Thanks and have a good day!

    Hi,
    I have "deploy" directory, and I whant to be able to import it to every computer with out to define things in class path.
    in my deploy I have my jar, lib directory, bech file to run (ther I have script with the libs path..), I want to put in deploy the db.properties file.
    then just ask "from where I'm running" -->
    String osWorkDir = System.getProperty("user.dir");then just to add this path "/db.properties"
    The problem with it:
    osWorkDir = C:\MyJava\deploy
    and I need:
    C:/MyJava/deploy
    Thanks :)
    I want to import my

  • How to get the path of the image stored in DMS

    Hi everyone..
    My question is that I have attached an image with an order through transaction jha2n..
    Now my requirement is to get the image in report..
    I know the Logical id in ISM_l_ord class and physical id in ISM_P_Ord class.
    I know that link between image and order is in SKWG_BREL.
    But i am not able to get the path so that i can show the image in docking control.
    pls help to retrive the path of the image stored...
    Thanks
    Pooja

    EpicMaster wrote:Now the problem is when I run the application through the .jar file in the dist/ directory the images simply wont load...
    ..lblProduct.setIcon(new ImageIcon("Resources.zip/res/Product.png"));
    Now the problem is when I Build&Clean the whole project which creates a /dist directory containing the complied and execulatble .Jar file for the application AND a folder called "lib" which contains the Resource.Zip folderThe String based constructor to ImageIcon presumes the String represents a File path. File objects do not work with resources inside Jar or Zip archives, for those, you need an URL. Gain the URL using something like..
    URL urlToImage = this.getClass().getResource("/res/Product.png");

  • How to get the path of  my webapp?

    example mywebapp: " http://xxxx.com/test/index.html"
    The "test" is the path of my webapp,is there any function use to get the path in the HttpServlet?
    thanks!

    request.getContextPath();

  • How to get the path of the selected Jtree node for deletion purpose

    I had one Jtree which show the file structure of the system now i want to get the functionality like when i right click on the node , it should be delete and the file also deleted from my system, for that how can i get the path of that component
    i had used
    TreePath path = tree.getPathForLocation(loc.x, loc.y);
    but it gives the array of objects as (from sop)=> [My Computer, C:\, C:\ANT_HOME, C:\ANT_HOME\lib, C:\ANT_HOME\lib\ant-1.7.0.pom.md5]
    i want its last path element how can i get it ?

    Call getLastSelectedPathComponent() on the tree.

Maybe you are looking for

  • 6 unions when not found  data I must return zero

    Hi I have a query SELECT CD_INDICADOR, VL_INDICADOR           FROM T_EC_PESSOA_PERFIL_CICLO PPC           WHERE PPC.NM_CICLO_OPERACIONAL = 200804 AND                 PPC.CD_ESTRUTURA_COMERCIAL = 1040 AND                 PPC.CD_TIPO_ESTRUTURA_COMERCIA

  • Is it safe to use an ipad charger to charge an iphone?

    Can I use the ipad charger to charge an iphone? (Will it be safe)?

  • GRC Access Enforcer - Technical Dependency?

    All, My organisation currently has GRC Compliance Calibrator and Firefighter installed with version 4.0. Our landscape is based on SAP NW 2004 (XI3.0) with ERP2004 (ECC5), BW3.5 and SRM4.0 We want to implement Access Enforcer but do not have a java s

  • Disabling jbo.ampool.timetolive

    Hi! I want to disable the use of the parameter jbo.ampool.timetolive, because I set the limit of the AM pool to zero using jbo.ampool.minavaiblesize. Now, I don´t know if this is possible, my best guess is to set the value to -1. Am I right? Thanks!

  • Wrapping table cell contents

    Hi I have a requirement where i need to wrap my table cell contents.I have chekced all the properties of table but none serves my purpose.Kindly help in this direction. NWDS version : 7.3 Server version : 7.3 SP02 Thanks Monika