0
這是我到目前爲止的正則表達式,但它是選擇鍵。我只是想選擇值的所有實例:https://regex101.com/r/fA5cP9/1如何使用RegEx從JSON獲取所有字符串值,而不是Keys?
{
"contact": {
"name": "John Doe",
"label": "Web Developer",
"email": "[email protected]",
"phone": "(123) 123-1234",
"website": "www.example.com",
"profiles": [{
"network": "LinkedIn",
"url": "www.linkedin.com"
}]
}
}
爲什麼你想用正則表達式來解決這個問題? – Xufox
有沒有更好的方法?我需要製作一個所有值的單個數組? – user1869257
此外,你有一個所有的值列表後,你實際上試圖達到什麼? JSON的目的已經是在邏輯結構中組織數據。爲什麼你會嘗試提取列表中已經組織的值? – Xufox