如何将字符串列表字典转换为列表

时间:2020-01-30 05:53:32

标签: python-3.x

filter = '[{"name":"MinPrice","value": "50"},{"name":"MaxPrice","value": "100"}]'

如何将该字符串转换为列表?不更改实际数据。数据不应更改

2 个答案:

答案 0 :(得分:0)

首先,请不要将其命名为var got = require('got'); var requestPayload = {foo: 'bar'}; got.post('https://your-api.com/endpoint', { body: JSON.stringify(requestPayload), headers: { 'accept': 'application/json' }, json: true }).then(function(response) { console.log(response.body) callback(null, response.body); }).catch(function(error) { callback(error) }); , 因为它掩盖了非常好的builtin identifier。 我将重命名为filter

使用json模块:

filt

答案 1 :(得分:0)

尝试一下:

data <- readRDS("path") ## reading the file from the location
names(data$)
相关问题