bobdebower's avatar

how to write this xml without attribute

hello how to write this xml without atrribute? i want to covert it to json

here is the example

<match what="game">20</match>
 

// do you write it like this?

<match> 

 <what>pager</what>
 <game>20</game>

 </match>

another example how to write this without attribute?

                <lead>
		<option name="version">50</option>
		<option name="timeline">closed</option>
	    </lead>
0 likes
3 replies
laracoft's avatar
laracoft
Best Answer
Level 27

@laradoel

{
    "matches":[
        {
            "id": 20,
            "what": "game",
        },
        {
            "id": 21,
            "what": "pager",
        }
    ]
}
{
    "leads": [
        {
            "version": 50,
            "timeline": "closed"
        },
        {
            "version": 51,
            "timeline": "open"
        }
    ]
}

Please or to participate in this conversation.