首页 > 解决方案 > JSON parsing from a link

问题描述

I have been looking at parsing some data from a few different sources. For example, I was looking at this link: http://universities.hipolabs.com/search, and I can filter all Canadian universities just by adding the following key-value pair

http://universities.hipolabs.com/search?country=canada

I can filter even further just by adding a & key-value pair [&name=acadia] to the end of the link.

How do I do the same say with the Lakers Store? I can get all product metadata in JSON format

https://lakersstore.com/products.json

but I can't get it filtered like the university list

标签: jsonapirestparsing

解决方案


如果你想过滤它,你应该实现过滤功能:

  1. 从链接中提取数据。
  2. 将数据转换为元素列表。
  3. 在这些列表上应用您的过滤器。
  4. 检索过滤的数据。

过滤 JSON 对象的在线工具。

https://jsonpath.com/


推荐阅读