$str = '[{"rwx_price":388.5,"end_station_name":"长沙","swz_price":0,"swz_num":"--","to_station_name":"长沙","ydz_num":"--","yz_num":"*","rw_num":"*","arrive_days":"1","rz_num":"--","access_byidcard":"0","yz_price":138.5,"ywz_price":246.5,"sale_date_time":"1100","from_station_code":"CUW","rz_price":0,"gjrw_num":"--","to_station_code":"CSQ","ydz_price":0,"wz_price":138.5,"tdz_price":0,"run_time":"15:36","yw_num":"*","edz_price":0,"qtxb_price":0,"can_buy_now":"N","yw_price":238.5,"train_type":"K","rw_price":372.5,"note":"7月22日11点起售","train_no":"760000K5780K","train_code":"K579","from_station_name":"重庆北","run_time_minute":"936","ywx_price":255.5,"arrive_time":"05:28","start_station_name":"成都东","start_time":"13:52","wz_num":"*","edz_num":"--","qtxb_num":"--","train_start_date":"20160919","gjrw_price":0,"tdz_num":"--"},{"rwx_price":0,"end_station_name":"长沙","swz_price":0,"swz_num":"--","to_station_name":"长沙","ydz_num":"--","yz_num":"*","rw_num":"--","arrive_days":"1","rz_num":"--","access_byidcard":"0","yz_price":128.5,"ywz_price":230.5,"sale_date_time":"1100","from_station_code":"CUW","rz_price":0,"gjrw_num":"--","to_station_code":"CSQ","ydz_price":0,"wz_price":128.5,"tdz_price":0,"run_time":"14:10","yw_num":"*","edz_price":0,"qtxb_price":0,"can_buy_now":"N","yw_price":222.5,"train_type":"K","rw_price":0,"note":"7月22日11点起售","train_no":"760000K50406","train_code":"K504","from_station_name":"重庆北","run_time_minute":"850","ywx_price":237.5,"arrive_time":"06:22","start_station_name":"成都东","start_time":"16:12","wz_num":"*","edz_num":"--","qtxb_num":"--","train_start_date":"20160919","gjrw_price":0,"tdz_num":"--"},{"rwx_price":509.5,"end_station_name":"广州","swz_price":0,"swz_num":"--","to_station_name":"长沙","ydz_num":"--","yz_num":"*","rw_num":"*","arrive_days":"1","rz_num":"--","access_byidcard":"0","yz_price":180.5,"ywz_price":321.5,"sale_date_time":"1100","from_station_code":"CUW","rz_price":0,"gjrw_num":"--","to_station_code":"CSQ","ydz_price":0,"wz_price":180.5,"tdz_price":0,"run_time":"20:47","yw_num":"*","edz_price":0,"qtxb_price":0,"can_buy_now":"N","yw_price":310.5,"train_type":"K","rw_price":488.5,"note":"7月22日11点起售","train_no":"770000K35804","train_code":"K358","from_station_name":"重庆北","run_time_minute":"1247","ywx_price":331.5,"arrive_time":"20:07","start_station_name":"重庆北","start_time":"23:20","wz_num":"*","edz_num":"--","qtxb_num":"--","train_start_date":"20160919","gjrw_price":0,"tdz_num":"--" }]';

$str = json_decode($str,true); echo '<meta http-equiv="Content-type" content="text/html:charset=utf-8">';
echo '<pre>';
var_dump($str);exit;

把json数据 [ { } ] 转为数组的更多相关文章

  1. 花括号中的json数据--->转为数组array

    //正式服务器 更换航班 public function changef(){ $str = '{"airportTax":50,"arriModifyTime" ...

  2. js声明json数据,打印json数据,遍历json数据,转换json数据为数组

    1.js声明json数据: 2.打印json数据: 3.遍历json数据: 4.转换json数据为数组; //声明JSON var json = {}; json.a = 1; //第一种赋值方式(仿 ...

  3. php json字符串转为数组或对象

    从网上查到的方法是 用get_object_vars 把类类型转换成数组 然后在用foreach  遍历即可 $array = get_object_vars($test); $json= '[{&q ...

  4. 使用superobject 新建Json数据(数组)

    1. 要得到的Json数据:[{"name":"张三","age": 17},{"name":"李四" ...

  5. json数据转为对象,一般在前台把数据传回后端中使用 转https://www.cnblogs.com/zxtceq/p/6610214.html

    public static JArray GetData2JArray(string url, string key) { string jsonData = HttpHelper.HttpGet(u ...

  6. json数据转为Map集合

    我是利用Gson来弄得Gson gson = new Gson();//显得出HashMap的类型Type type = new TypeToken<HashMap<String, Str ...

  7. c# 将json数据转为键值对

    string json = "{\"orderId\":\"000001\",\"haha\":\"001\" ...

  8. python json数据的转换

    1  Python数据转json字符串 import json json_str = json.dumps(py_data) 参数解析: json_str = json.dumps(py_data,s ...

  9. 将Json数据转换为ADO.NET DataSet对象

    Json数据转换为ADO.NET DataSet其实方法有很多,Newtonsoft.Json也提供了DataSet的Converter用以转换Json数据.但是有些情况下DataSet Conver ...

随机推荐

  1. js实现浏览器通知功能

    概述 Notification API是浏览器的通知接口,用于在用户的桌面(而不是网页上)显示通知信息,桌面电脑和手机都适用,比如通知用户收到了一封Email.具体的实现形式由浏览器自行部署,对于手机 ...

  2. Linux 复习重点目录

    Linux安全复习 一.Linux基本命令 1.文件管理命令 lvm 2.用户管理命令 3.网络管理命令 4.权限管理 普通权限和特殊权限 权限命令修改 5.服务命令 6.软件安装管理命令 yum安装 ...

  3. 开通域名绑定DDNS

    一.初衷 我想要有一个自己的域名,然后有自己的server,在server上搭一个网站或者开通一个ftp服务,我想通过这个域名来访问它. 二.什么是DDNS DDNS 动态dns,电信宽带采用拨号联网 ...

  4. express 4.x 文件上传

    1.安装文件上传模块: npm install multiparty --save 2.在routes/index.js 中添加: // 引用模块 let multiparty = require(& ...

  5. Hololens文件读写

    unity 内勾选 RemovableStorage 选项或 Package.appxmanifest 勾选 可移动存储 选项 uwp app IO操作用 StreamReader 会提示没有权限,如 ...

  6. 新发现的一些C函数

    今天看lsocket代码,发现有三个C函数,以前一直没有用过. 觉得特别有意思,一个strspn,一个strrchr,一个getaddrinfo. strspn #include <string ...

  7. Spring MVC中页面向后台传值的几种方式

    在学习 Spring Mvc 过程中,有必要来先了解几个关键参数:   @Controller:         在类上注解,则此类将编程一个控制器,在项目启动 Spring 将自动扫描此类,并进行对 ...

  8. Jmeter(四)-断言/检查点

    断言就类似LoadRunner中的检查点.对上一个请求返回的信息,做字符串.数据包大小.HTML.XML.图片等做判断,确保返回的信息的准确性. 添加响应断言:欢迎您 如果登陆页登陆成功,则后台会返回 ...

  9. Alamofire4.0 在 CocoaPods无法更新的问题

    因为淘宝镜像已经不能使用,使用新的镜像升级ruby到最新状态 platform :ios, '9.0'use_frameworks! target '输入你的工程名字' do pod 'Alamofi ...

  10. ora2pg数据迁移

    1.安装strawberry-perl-5.242.安装ora2pg-17.4 #perl Makefile.PL #dmake && dmake install3.安装ora2pg相 ...