I would like to format json data into html.
I have attempted this for a few days, and success looms. :0)
The json-parse return data is this:
Code: Select all
(("result" (("totalResults" 19) ("products" ((("productTitle" "GILDAN EMACS GNU XEMACS LISP programmers wildebeest short-sleeved T-shirt") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1HMtjKuuSBuNjSsziq6zq8pXaz/GILDAN-EMACS-GNU-XEMACS-font-b-LISP-b-font-programmers-wildebeest-short-sleeved-T-shirt.jpg") ("productUrl" "https://www.aliexpress.com/item/GILDAN-EMACS-GNU-XEMACS-LISP-programmers-wildebeest-short-sleeved-T-shirt/32919995838.html")) (("productTitle" "EMACS GNU XEMACS LISP programmers wildebeest short-sleeved T-shirt men") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1ZiW5OVXXXXbhXFXXq6xXFXXX5/EMACS-GNU-XEMACS-font-b-LISP-b-font-programmers-wildebeest-short-sleeved-T-shirt-men.jpg") ("productUrl" "https://www.aliexpress.com/item/EMACS-GNU-XEMACS-LISP-programmers-wildebeest-short-sleeved-T-shirt-men/2048199251.html")) (("productTitle" "GILDAN EMACS GNU XEMACS LISP programmers wildebeest short-sleeved T-shirt") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1gNryaifrK1RjSspbq6A4pFXa6/GILDAN-EMACS-GNU-XEMACS-font-b-LISP-b-font-programmers-wildebeest-short-sleeved-T-shirt.jpg") ("productUrl" "https://www.aliexpress.com/item/GILDAN-EMACS-GNU-XEMACS-LISP-programmers-wildebeest-short-sleeved-T-shirt/32961316694.html")) (("productTitle" "EMACS GNU XEMACS LISP programmers wildebeest short-sleeved T-shirt men") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1OQTXX9CWBuNjy0Fhq6z6EVXa1/EMACS-GNU-XEMACS-font-b-LISP-b-font-programmers-wildebeest-short-sleeved-T-shirt-men.jpg") ("productUrl" "https://www.aliexpress.com/item/EMACS-GNU-XEMACS-LISP-programmers-wildebeest-short-sleeved-T-shirt-men/32708902913.html")) (("productTitle" "Lisp John McCarthy Lisp t shirt top clothing tee for funny male tshirt harajuku streetwear t-shirt men hip hop C2613") ("imageUrl" "https://ae01.alicdn.com/kf/HLB1KsivXOHrK1Rjy0Flq6AsaFXa8/-font-b-Lisp-b-font-John-McCarthy-font-b-Lisp-b-font-t-shirt-top.jpg") ("productUrl" "https://www.aliexpress.com/item/Lisp-John-McCarthy-Lisp-t-shirt-top-clothing-tee-for-funny-male-tshirt-harajuku-streetwear-t/32951457641.html")) (("productTitle" "Lisp John McCarthy Lisp t shirt men hop t-shirt clothing tshirt male streetwear harajuku funny top hip for tee PF2613") ("imageUrl" "https://ae01.alicdn.com/kf/HLB1fw3tKHvpK1RjSZFqq6AXUVXaG/-font-b-Lisp-b-font-John-McCarthy-font-b-Lisp-b-font-t-shirt-men.jpg") ("productUrl" "https://www.aliexpress.com/item/Lisp-John-McCarthy-Lisp-t-shirt-men-hop-t-shirt-clothing-tshirt-male-streetwear-harajuku-funny/32983702961.html")) (("productTitle" "New Short Sleeve Round Collar Mens T Shirts Fashion 2018 A Lisp Symbol - Mens Crewneck T-shirt - 7 Colours") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1KMFuXiCYBuNkSnaVq6AMsVXam/New-Short-Sleeve-Round-Collar-Mens-T-Shirts-Fashion-2018-A-font-b-Lisp-b-font.jpg") ("productUrl" "https://www.aliexpress.com/item/New-Short-Sleeve-Round-Collar-Mens-T-Shirts-Fashion-2018-A-Lisp-Symbol-Mens-Crewneck-T/32851305347.html")) (("productTitle" "EMACS GNU XEMACS LISP programmer red and blue logo T-shirt Top Lycra Cotton Men T shirt New Design High Quality") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1Q2qyOVXXXXa8aFXXq6xXFXXX2/EMACS-GNU-XEMACS-font-b-LISP-b-font-programmer-red-and-blue-logo-T-shirt-Top.jpg") ("productUrl" "https://www.aliexpress.com/item/EMACS-GNU-XEMACS-LISP-programmer-red-and-blue-logo-short-sleeved-T-shirt-men/2048564231.html")) (("productTitle" "EMACS GNU XEMACS LISP programmer red and blue logo T-shirt Top Lycra Cotton Men T shirt New Design High Quality") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1lv2iX1OSBuNjy0Fdq6zDnVXaz/EMACS-GNU-XEMACS-font-b-LISP-b-font-programmer-red-and-blue-logo-T-shirt-Top.jpg") ("productUrl" "https://www.aliexpress.com/item/EMACS-GNU-XEMACS-LISP-programmer-red-and-blue-logo-T-shirt-Top-Lycra-Cotton-Men-T/32708922788.html")) (("productTitle" "EMACS GNU XEMACS LISP programmers wildebeest men Sweatshirts Thick Combed Cotton") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1ooXHbzuhSKJjSspjq6Ai8VXa9/EMACS-GNU-XEMACS-font-b-LISP-b-font-programmers-wildebeest-men-Sweatshirts-Thick-Combed-Cotton.jpg") ("productUrl" "https://www.aliexpress.com/item/EMACS-GNU-XEMACS-LISP-programmers-wildebeest-men-Sweatshirts-Thick-Combed-Cotton/32834143521.html")) (("productTitle" "EMACS GNU XEMACS LISP programmers wildebeest men Sweatshirts Thick Combed Cotton") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1UabedvBNTKJjSszbq6yFrFXaf/EMACS-GNU-XEMACS-font-b-LISP-b-font-programmers-wildebeest-men-Sweatshirts-Thick-Combed-Cotton.jpg") ("productUrl" "https://www.aliexpress.com/item/EMACS-GNU-XEMACS-LISP-programmers-wildebeest-men-Sweatshirts-Thick-Combed-Cotton/32833672611.html")) (("productTitle" "Lisp John McCarthy Lisp t shirt harajuku kawaii t-shirt female femme cartoon tops tshirt women tee clothing graphic K2613") ("imageUrl" "https://ae01.alicdn.com/kf/HTB17jx4e9rqK1RjSZK9q6xyypXaE/-font-b-Lisp-b-font-John-McCarthy-font-b-Lisp-b-font-t-shirt-harajuku.jpg") ("productUrl" "https://www.aliexpress.com/item/Lisp-John-McCarthy-Lisp-t-shirt-harajuku-kawaii-t-shirt-female-femme-cartoon-tops-tshirt-women/32934917454.html")) (("productTitle" "Lisp John McCarthy Lisp Hoodies Men Casual Hip Hop Sweatshirt Traksuit Pullover Hoody Tops E4301") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1sxcOKXGWBuNjy0Fbq6z4sXXah/-font-b-Lisp-b-font-John-McCarthy-font-b-Lisp-b-font-Hoodies-Men-Casual.jpg") ("productUrl" "https://www.aliexpress.com/item/Lisp-John-McCarthy-Lisp-Hoodies-Men-Casual-Hip-Hop-Sweatshirt-Traksuit-Pullover-Hoody-Tops-E4301/32922051065.html")) (("productTitle" "Lisp John McCarthy Lisp Hoodies Men Hooded Sweatshirts Print Quality Pullover Casual Fashion Tracksuit Streetwear X4301") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1bTA7IHGYBuNjy0Foq6AiBFXai/-font-b-Lisp-b-font-John-McCarthy-font-b-Lisp-b-font-Hoodies-Men-Hooded.jpg") ("productUrl" "https://www.aliexpress.com/item/Lisp-John-McCarthy-Lisp-Hoodies-Men-Hooded-Sweatshirts-Print-Quality-Pullover-Casual-Fashion-Tracksuit-Streetwear-X4301/32905489790.html")) (("productTitle" "Lisp John McCarthy Lisp Hoodies Men Hooded Sweatshirts Print Quality Pullover Casual Fashion Tracksuit Streetwear X4301") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1M5cvmTmWBKNjSZFBq6xxUFXa9/-font-b-Lisp-b-font-John-McCarthy-font-b-Lisp-b-font-Hoodies-Men-Hooded.jpg") ("productUrl" "https://www.aliexpress.com/item/Lisp-John-McCarthy-Lisp-Hoodies-Men-Hooded-Sweatshirts-Print-Quality-Pullover-Casual-Fashion-Tracksuit-Streetwear-X4301/32910155757.html")) (("productTitle" "Lisp John McCarthy Lisp 3D Hoodie Hoodies Men Women 2019 Long Sleeve Autumn WInter Tops Tees Casual Sweatshirt Sweatshirts P4301") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1ENJeXELrK1Rjy0Fjq6zYXFXaH/-font-b-Lisp-b-font-John-McCarthy-font-b-Lisp-b-font-3D-Hoodie-Hoodies.jpg") ("productUrl" "https://www.aliexpress.com/item/Lisp-John-McCarthy-Lisp-3D-Hoodie-Hoodies-Men-Women-2019-Long-Sleeve-Autumn-WInter-Tops-Tees/32946570658.html")) (("productTitle" "EMACS GNU XEMACS LISP programmer red and blue logo men Sweatshirts Thick Combed Cotton") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1X.5ampcJL1JjSZFOq6AWlXXao/EMACS-GNU-XEMACS-font-b-LISP-b-font-programmer-red-and-blue-logo-men-Sweatshirts-Thick.jpg") ("productUrl" "https://www.aliexpress.com/item/EMACS-GNU-XEMACS-LISP-programmer-red-and-blue-logo-men-Sweatshirts-Thick-Combed-Cotton/32834402567.html")) (("productTitle" "EMACS GNU XEMACS LISP programmer red and blue logo men Sweatshirts Thick Combed Cotton") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1V9WKXLNNTKJjSspfq6zXIFXa6/EMACS-GNU-XEMACS-font-b-LISP-b-font-programmer-red-and-blue-logo-men-Sweatshirts-Thick.jpg") ("productUrl" "https://www.aliexpress.com/item/EMACS-GNU-XEMACS-LISP-programmer-red-and-blue-logo-men-Sweatshirts-Thick-Combed-Cotton/32833411013.html")) (("productTitle" "Lisp John McCarthy Lisp 3D Print Hoodies women 2018 Black Cosplay Hoody Sweatshirt kpop Hipster Streetwear Tops Pullovers V2613") ("imageUrl" "https://ae01.alicdn.com/kf/HTB1Y_HUXjDuK1Rjy1zjq6zraFXay/-font-b-Lisp-b-font-John-McCarthy-font-b-Lisp-b-font-3D-Print-Hoodies.jpg") ("productUrl" "https://www.aliexpress.com/item/Lisp-John-McCarthy-Lisp-3D-Print-Hoodies-women-2018-Black-Cosplay-Hoody-Sweatshirt-kpop-Hipster-Streetwear/32935074154.html")))))) ("currentPageNum" 0) ("errorCode" 20010000) ("totalPageNum" 0))
Code: Select all
<a href="https://www.aliexpress.com/item/EMACS-GNU-XEMACS-LISP-programmer-red-and-blue-logo-men-Sweatshirts-Thick-Combed-Cotton/32833411013.html">EMACS GNU XEMACS LISP programmer red and blue logo men Sweatshirts Thick Combed Cotton</a>
<img src=https://ae01.alicdn.com/kf/HTB1HMtjKuuSBuNjSsziq6zq8pXaz/GILDAN-EMACS-GNU-XEMACS-font-b-LISP-b-font-programmers-wildebeest-short-sleeved-T-shirt.jpg">"
I am trying with lookup and dolist but am having trouble getting into the parentheses without having to create a lookup address for each item.
I can get this far:
Code: Select all
(set 'ali (get-url ali-link))
(set 'alie (json-parse ali))
(println (lookup "products" (lookup "result" alie)))