我希望删除_id
字段及其更改的值:
{ "_id" : { "$oid" : "54da1bee58743hd23947f493" }, "name":"david", "age":"33"}
{ "_id" : { "$oid" : "5422222222222345d9f1f493" }, "name":"Dove", "age":"33"}
{ "_id" : { "$oid" : "54da1be57a4b727669f1f493" }, "name":"man", "age":"23"}
outcome:
{"name":"david","age":"33"}
{"name":"Dove", "age":"33"}
{"name":"man", "age":"23"}
我想使用sed
或任何其他命令。
答案 0 :(得分:3)
使用jq
很容易。
{"name":"david","age":"33"}
{"name":"Dove","age":"33"}
{"name":"man","age":"23"}
O / P:
Glide.with(getContext()).load(imageUrl +".png")
.fitCenter()
.listener(new RequestListener<String, GlideDrawable>() {
@Override
public boolean onException(Exception e,
String model,
Target<GlideDrawable> target,
boolean isFirstResource)
{
return false;
}
@Override
public boolean onResourceReady(GlideDrawable resource,
String model,
Target<GlideDrawable> target,
boolean isFromMemoryCache,
boolean isFirstResource)
{
icon.setVisibility(View.VISIBLE);
}
}).into(icon);