I have an object that has an attribute formed by more attributes, something like this:
'.texto': {
fill: 'black',
ref: '.body', 'ref-x': 0.5, 'x-alignment': 'middle', 'ref-y': 55,
'y-alignment': 'middle',
'text-anchor': 'middle',
'font-weight': 'bold',
'font-variant': 'small-caps',
'text-transform': 'capitalize',
'font-size': '14px',
text : ''}
I would like to know how to get the value of "text" that is inside the ".text" attribute.
To obtain the value of an attribute I use the following expression:
"elemento".attributes.attrs["atributo"];
I've tried doing something like:
"elemento".attributes.attrs[".texto": {text}];
or
"elemento".attributes.attrs[".texto"/text}];
But I can not get the value, does anyone know how I can get the value of "text" ?.
Greetings and thanks.
Pd: I'm using the jquery and joint libraries.