首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用JSON API解析离子数据问题

使用JSON API解析离子数据问题
EN

Stack Overflow用户
提问于 2017-12-05 09:27:55
回答 0查看 57关注 0票数 0

我试图通过在wordpress的ionWordpress (离子框架插件)中使用JSON来抓取数据。

我使用的是JSON API。这是我的JSON中的数据。

代码语言:javascript
运行
复制
    {
  "status": "ok",
  "count": 6,
  "count_total": 45,
  "pages": 8,
  "posts": [
    {
      "id": 1874,
      "type": "event",
      "slug": "stesets",
      "url": "http://www.web.com/page",
      "status": "publish",
      "title": "setst",
      "title_plain": "tests",
      "content": "testsetstst",
      "excerpt": "testsetststtes",
      "date": "2017-11-27 17:20:17",
      "modified": "2017-11-27 17:20:17",
      "categories": [],
      "tags": [],
      "author": {
        "id": 1,
        "slug": "test",
        "name": "test",
        "first_name": "",
        "last_name": "",
        "nickname": "test",
        "url": "",
        "description": ""
      },
      "comments": [],
      "attachments": [],
      "comment_count": 0,
      "comment_status": "closed",
      "thumbnail": "http://www.website.com/wp-content/uploads/2017/11/image.jpg",

我的问题是,当我试图获取数据时,它也包含了[]。例如。

代码语言:javascript
运行
复制
{{post.thumbnail}}

这将显示["http://www.website.com/wp-content/uploads/2017/11/image.jpg"]

但我只想要链接本身而不是“”

我该怎么做呢?

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47644663

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档