邮递员 - 如何从对象中提取一对变量值(随机选择)

发布于 2025-02-08 14:10:19 字数 540 浏览 1 评论 0原文

我有以下响应,从中我将UUID随机化在ENV变量中(在另一个请求中需要它们)。现在,如果我获得第一个对象的UUID,则需要

"data": [
        {
            "uuid": "14a12361-7057-4fb6-a4db-d234d39612a9",
            "title": "Male"
        },
        {
            "uuid": "5305f671-9a99-4c35-9703-9ea01e86d75d",
            "title": "Female"
        },
        {
            "uuid": "ff8d370g-d799-4ddf-ba97-e1c56624cdb0",
            "title": "Other"
        }
    ]

在我需要相应标题的第一个对象的uuid时提取标题,在这种情况下:男性。

我不知道该怎么做,因为我只发现有关如何提取价值的问题/答案,但没有如何提取另一对。 预先感谢您帮助我。

I have below response, from which I randomize the uuids in an env variable (as they are required in another request). Now I need to extract the title after I have the coresponding uuid

"data": [
        {
            "uuid": "14a12361-7057-4fb6-a4db-d234d39612a9",
            "title": "Male"
        },
        {
            "uuid": "5305f671-9a99-4c35-9703-9ea01e86d75d",
            "title": "Female"
        },
        {
            "uuid": "ff8d370g-d799-4ddf-ba97-e1c56624cdb0",
            "title": "Other"
        }
    ]

ex if I get the uuid of the first object I need the corresponding title, in this case: Male.

I have no idea how to do it, as I only found questions/answers on how to extract a value, but not how to extract the pair of another one.
Thank you in advance for helping me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文