Click here to Skip to main content
15,911,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi I'm using this link to get imagurls in flipkart but it gives me alot of images sizes so I coudn't choose on url to show I'm using this link ti get imgurlls

try { strimageUrls = item["productBaseInfo"]["productAttributes"]["imageUrls"].ToString(); }


I need to get the image size url for 200x200

any one have any idea please tell me I'm using json

What I have tried:

I suggest to made array to loop throw imgurls with those sizes but I don't know how can I do this any help ??????
Posted
Updated 16-Sep-16 3:42am
Comments
Karthik_Mahalingam 16-Sep-16 9:34am    
post some sample data
Sarah Mohammed77 16-Sep-16 9:52am    
data shown like that "imageUrls": {
"400x400": "http://img5a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-400x400-imad92ejsne8uz5j.jpeg",
"275x275": "http://img6a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-275x275-imad92ejsne8uz5j.jpeg",
"75x75": "http://img5a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-75x75-imad92ejsne8uz5j.jpeg",
"125x125": "http://img6a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-125x125-imad92ejsne8uz5j.jpeg",
"40x40": "http://img5a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-40x40-imad92ejsne8uz5j.jpeg",
"100x100": "http://img6a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-100x100-imad92ejsne8uz5j.jpeg",
"1100x1360": "http://img6a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-1100x1360-imad92ejsne8uz5j.jpeg",
"200x200": "http://img6a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-200x200-imad92ejsne8uz5j.jpeg",
"unknown": "http://img5a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-original-imad92ejsne8uz5j.jpeg",
"180x240": "http://img5a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-180x240-imad92ejsne8uz5j.jpeg",
"275x340": "http://img5a.flixcart.com/image/wallet-card-wallet/g/p/u/16x-0-09-004-american-tourister-wallet-slim-fold-wallet-275x340-imad92ejsne8uz5j.jpeg"
},
Sarah Mohammed77 16-Sep-16 9:54am    
I just want to get one url which shows the 200x200
Richard Deeming 16-Sep-16 11:20am    
Assuming you're using JSON.NET, what's wrong with:
item["productBaseInfo"]["productAttributes"]["imageUrls"]["200x200"].ToString()
Sarah Mohammed77 16-Sep-16 12:48pm    
thx it works , once it doesn't get in mind to use it :D

1 solution

refer this sample

var urls = [
            'https://rukminim1.flixcart.com/image/200/200/iron/f/g/c/philips-gc1905-gc1905-original-imadztntwyhmcmge.jpeg?q=80',
            'https://rukminim1.flixcart.com/merch/200/200/images/1470378893322.jpg?q=80',
            'https://rukminim1.flixcart.com/image/200/200/shirt/n/c/e/17621-0026blues-levi-s-m-original-imaegdynbtwa4v3c.jpeg?q=80',
            'https://rukminim1.flixcart.com/image/312/312/mobile/a/6/z/samsung-galaxy-j5-2016-sm-j510fzwuins-original-imaeg8cyzupzrkcc.jpeg?q=70'
             
        ];

        var imagesof200 = [];
        for (var i = 0; i < urls.length; i++) {
            if (urls[i].indexOf('/200/200/') != -1)
                imagesof200.push(urls[i]);
        }
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900