Questions tagged [key-value]

A key-value pair is a set of two linked data items: a key which uniquely identifies some item of data, and the value, which is either the data that is identified or a pointer to the location of that data. Key-value pairs are frequently used in lookup tables, hash tables and configuration files.

A key-value pair is a set of two linked data items: a key which uniquely identifies some item of data, and the value, which is either the data that is identified or a pointer to the location of that data. Key-value pairs are frequently used in lookup tables, hash tables and configuration files.

http://searchenterprisedesktop.techtarget.com/definition/key-value-pair

A collection of key-value pairs is called an associative array.

The concept of key value pairs is applied in modern NoSQL databases for representing a storage mechanism. Key-Value is also a way to assign attributes and values to NSObject based instances in Cocoa framework (Related: Objective-C).

3201 questions
0
votes
2 answers

find the count of matching pair value in a dictionary where each key has more than one value

I am currently trying to find the count of pair occurrences in a dictionary where each key has more than one value. example, here is a dict: df_dict = { 'apple': ['1.0', '3.0'], 'banana': ['2.0', '5.0'], 'orange': ['1.0', '3.0'], 'plum': ['2.0',…
icedtea
  • 5
  • 2
0
votes
3 answers

Fetch multiple values stored as key-value pairs in the json date type and display as columns

I have a database table that stores the sales data and the associated extra charges in a key-value format using the json date type. Following is the minimal structure. saleID amount extra_charges ------- ------…
Hareesh Sivasubramanian
  • 1,265
  • 7
  • 17
  • 27
0
votes
1 answer

Why accessing Keys Values in dictionary in python like this is not working

Is not both are right? def report(): """It prints the value of each resource""" print(f"resources['water']: {resources['water']}") print(f"resources['milk']: {resources['milk']}") print(f"resources['coffee']: {resources['coffee']}") …
Ahmad Ali
  • 1
  • 1
  • 2
0
votes
0 answers

Any way to get the text value of a key that's stored in the database? (replit node.js)

I kept trying to find a solution but couldn't find it anywhere, I'm using this for my discord bot and I want it to send the text value of a stored key in the database as a text message to discord. How do I do this?? I tried things such as…
0
votes
0 answers

console.log() printing incorrect values for key-value pair array

I am declaring a variable as an array of key-value pairs in my Javscript file to use it as a Dataframe of sorts, but I noticed that when I put the object in console.log() the numbers it shows are totally incorrect, and additionally those displayed…
kv005
  • 1
  • 2
0
votes
1 answer

Is it possible to retrieve creation date & time of a key-value pair in etcd?

I would like to know if the etcd database stores the date and time of when a key-value pair were created. Additionally, I would also like to know if etcd stores such information about previous versions of a key-value pair as well. I went through the…
0
votes
2 answers

How do I pass the KeyValuePair into this method?

How do I pass the KeyValuePair into this method, accepting ICollection>? If my header name is 'auth' and the header value is 'local' _restActions.ExecutePostRequest(resource, body, {WHAT GOES HERE});
JLee101
  • 93
  • 1
  • 1
  • 8
0
votes
0 answers

I fetched data to struct, while transferring data to storyboard, getting error 'this class is not key value coding-compliant for the key logolabel

struct dataInfo : Decodable { var name : String? var logo : String? } var data : [dataInfo] = [] class VeriTableViewCell: UITableViewCell { @IBOutlet weak var namelabel: UILabel! @IBOutlet weak var logolabel: UILabel! var…
kocaman
  • 11
  • 1
0
votes
4 answers

Can't loop through all of my dictionary keys

placement = { "cross": (50, 120), "circle": (640, 120), "cross": (1066, 120), "circle": (50, 360), "cross": (640, 360), "circle": (1066, 360), "cross": (50, 600), "circle": (640, 600), "cross": (1066,…
0
votes
0 answers

hashmaps getting key by distinct value

Example hashmap value 3 - 2 20 - 2 4 - 2 5 - 3 How to get key value 5 because it has unique/distinct value of 3 different from other with value of 2 Im trying to looping and comparing previous value still working on this. Is there a way to get this…
guradio
  • 15,524
  • 4
  • 36
  • 57
0
votes
2 answers

c# iterate over nested key value pair

I have a KeyValuePair and the object is also a KeyValuePair. I have been trying to cast the object to a new KeyValuePair so that I can iterate through the values, but so far all attempts have failed. Does anyone have any ideas. …
user1279156
  • 35
  • 1
  • 5
0
votes
2 answers

NODEJS Object Value Is a Key Value Pair

I have a request I receive through a webhook which returns the following object as…
z123
  • 193
  • 1
  • 15
0
votes
1 answer

Converting a list of dictionaries into a list of tuples

I am a rank beginner, so appreciate any help. I have a list of dictionaries: lst = [{'name': 'John', 'gender': 'Male', 'marks': [20,30,40]}, {'name': 'Lynn', 'gender': 'Female', 'marks': [20,30,40,50,60]},....] How would I convert this list…
Sur Tin
  • 1
  • 1
0
votes
0 answers

fetch key value pairs from object in sql BigQuery

I need to parse the column message and fetch the key value pairs from the same object and i need to create new columns with the fetched data. The data looks like this: {"segCode":"C002","segName":"Message Extras Test Segment Name",…
Praneet T
  • 1
  • 1
0
votes
1 answer

Check if a pair of values appears in a range

So what I need to do is basically this: I have a few pair of numbers that are conflicting and a range in Excel where I need to check if I have these pair of numbers appears e.g Conflicting numbers: 1 and 2 Range to check 1 3 4 8 2 In this case,…
1 2 3
99
100