나도 지금 앎
dict_1 = {
"item_name" : "blender",
"max_discount" : "10%",
"batch_number" : "RR450020FRG",
"price" : 340
}
여기서 dict_1 의 price 의 340 만 가져 오고 싶다면
dict_1['price']
모든것을 보려면
dict_1.items()
이런식으로 쓴다.
python을 사용하는 유저라면 정말 보기 편할 것이다.
실제 mongodb에서 쓰는 데이터 구조 입니다.
# Mongodb document (JSON-style)
document_1 = {
"_id" : "BF00001CFOOD",
"item_name" : "Bread",
"quantity" : 2,
"ingredients" : "all-purpose flour"
}
친숙한 모양의 nosql mongodb를 나름 해체 분석 해보겠습니다.