Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outputting Complex Data List #20

Open
rhythmicdevil opened this issue Oct 15, 2012 · 0 comments
Open

Outputting Complex Data List #20

rhythmicdevil opened this issue Oct 15, 2012 · 0 comments

Comments

@rhythmicdevil
Copy link

Hi,
I am having a really difficult time outputting a complex list of data. I was wondering if you would mind pointing me in the right direction. I have an object of objects that contain an array of objects. I cant seem to figure out the right combination of kiwi eachs to use to create an HTML UL from this. I figured I would try the raw tag and just do it in Javascript but the script tag make Kiwi throw an error.

Here is a sample of my data structure:

"monitoring": [
    {
        "Monitoring Most Recent Feed": [
            {
                "resultCode": "NO TESTS FOUND"
            }
        ]
    }
],
"cloud_sandbox": [
    {
        "Cloud Sandbox File": [
            {
                "test": "noname",
                "resultCode": 200
            },
            {
                "test": "noname",
                "resultCode": 200
            }
        ]
    }
],

Here is what I want the output to be:

    <ul>
        <li>monitoring</li>
            <ul>
                <li>Monitoring Most Recent Feed</li>
                    <ul>
                        <li>resultCode: NO TESTS FOUND</li>
                    </ul>
            </ul>
        <li>cloud_sandbox</li>
            <ul>
                <li>Cloud Sandbox File</li>
                    <ul>
                        <li>test: noname</li>
                        <li>resultCode: 200</li>
                    </ul>
                    <ul>
                        <li>test: namename</li>
                        <li>resultCode: 200</li>
                    </ul>
            </ul>
    </ul>

Any advice you may have to help achieve this would be greatly appreciated.

Thanks
Steve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant