我怎么能得到的字符串子:我如何获取子字符串?
[{
"ProductId"=>198,
"AttributesXml"=>"<Attributes><ProductAttribute ID=\"590\"><ProductAttributeValue><Value>1691</Value></ProductAttributeValue></ProductAttribute></Attributes>",
"StockQuantity"=>1,
"AllowOutOfStockOrders"=>false,
"Sku"=>nil,
"ManufacturerPartNumber"=>nil,
"Gtin"=>nil,
"OverriddenPrice"=>nil,
"NotifyAdminForQuantityBelow"=>1, "Id"=>1756
},
我想要的"ProductAtrribute ID": 590
才有价值。只有数字。 我已经签出了红宝石文档,但我找不到解决方案。
'590'从哪里来? –
您是否可以使用您正在使用的数据的完整字符串表示来更新此问题,并使用代码格式来帮助我们读取它? – ddubs
对不起,我编辑了我的帖子。 590在字符串中。 –