SVG databinding based on key
问题 I have an svg like below <g> <path d="M150 0 L75 200 L225 200 Z" id='path1'/> <path d="M151 0 L75 200 L225 100 Z" id='path2'/> <path d="M152 0 L75 200 L225 300 Z" id='path3'/> <path d="M153 0 L75 200 L225 400 Z" id='path4'/> </g> And I have a data.json like { [ "path2", "22218", "26627", "29101" ], [ "path4", "218", "207", "160" ] [ "path3", "22218", "26627", "29101" ], [ "path1", "218", "207", "160" ] } I am confused as how to bind the data based on the key.I am assuming that I can use the