Hello,
I want to show only one single dimension from avatarUrls, but by default it showing all 4 dimension as shown
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/1212121212?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FMB-5.png",
"24x24": "https://secure.gravatar.com/avatar/1212121212?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FMB-5.png",
"16x16": "https://secure.gravatar.com/avatar/1212121212?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FMB-5.png",
"32x32": "https://secure.gravatar.com/avatar/1212121212?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FMB-5.png"
}
I need to show only one by default
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/1212121212?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FMB-5.png",
}
I have tried many ways in one of my template, but no luck.
Please help me if you have already faced similar issue and fixed.
Regards,
Shiva.
Why don't you access the JSON key specifically for "48x48"?
avatar = avatarUrls["48x48"]
Hi Prince,
Thank you i have tried it and still it displaying all 4 dimensions.
Thank you,
Shiva.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would expect it to display only
https://secure.gravatar.com/avatar/1212121212?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FMB-5.png"
Which is the string of the URL and nothing more when accessing the specific key. Except you're still calling it as
avatar = avatarUrls
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I have slightly modified the structure in JSON file for this avatar urls attributes.
Now able to see the selected dimension.
Regards,
Shiva.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Which URL do you use to get this response ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.