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

How to check and return a boolean with Javascript if a certain key has a certain value in array of objects

I have an array of objects in my Javascript/React app: [ {type: 'TypeOne'} {type: 'TypeFive'} {type: 'TypeTen'} ] How to return a boolean true if the array contains an object with key/value type: 'TypeTen'?
meez
  • 3,783
  • 5
  • 37
  • 91
0
votes
1 answer

Get specific key-value from Hashicorp secret engine version 2

I'm using Hashicorp engine version 2 and namespace vault-poc Displays all key values for engine kv and path tool-common/dev as below: C:\Users\meuser>curl -H "X-Vault-Token: s.lcF5f0npjzeioNnbJvPVjihN" -H "X-Vault-Namespace: vault-poc/" -X GET…
Ashar
  • 2,942
  • 10
  • 58
  • 122
0
votes
2 answers

How can I arrange a dictionary using python so that the values are represented from lowest to highest order?

I have the following dictionary: d = {'A': {'A1': 2, 'A4': 4, 'A5': 1}, 'B': {'B3': 1, 'B7': 8, 'B5': 2}} How can I rearrange the dictionary to organize the values from lowest to highest order? I am expecting to have the following output after…
pr_kr1993
  • 185
  • 6
0
votes
0 answers

How can I log key/value data with the log and slog crates in rust?

I am trying to make key/value support in the "log" create work with slog as the backend. I selected slog because, according to https://github.com/rust-lang/log/issues/328 it seemed to be the most useful backend with key/value support in mind. I did…
Martin Geisse
  • 1,189
  • 1
  • 9
  • 22
0
votes
4 answers

Split array object to nested array for each separator

I am trying to split the below array { "Base/Brand/0101-color-brand-primary-red": "#fe414d", "Base/Brand/0106-color-brand-secondary-green": "#00e6c3", "Base/Brand/0102-color-brand-primary-light-gray": "#eaecf0", …
0
votes
1 answer

Rearranging Duplicate Values in a Hashmap pairs in ascending Key order

I want to write a piece of code in java that takes in an hashMap that is sorted in descending values. It only rearranges the pairs that have more than one duplicate values and order them in ascending key order. So {7=4, 17=2, 5=2} hashMap would…
Bosser445
  • 303
  • 1
  • 9
0
votes
0 answers

How to replace hard coded value with dynamic input variable in the outputs - Github actions

Harded code value app_name was here and it worked fine -> app_namexx: ${{ steps.run-script.outputs.app_name }} I now wish to replace hard coded app_name to input variable key_name. So, Tried the below but I get error: name: CALLER main…
Ashar
  • 2,942
  • 10
  • 58
  • 122
0
votes
0 answers

Why does Postman "form-data" body send differently than "raw>JSON" body?

When I make a simple POST to my local intake endpoint, I can create a lead with the following very simple raw JSON body inside Postman: { "identification_first_name": "New", "identification_last_name": "Lead", …
0
votes
1 answer

How to obtain nested object correctly from NgForm?

I need to obtain keyvalue correctly from ngForm. I have a User interface in Angular like this: export interface User { id: int; name: string; surname: string; school: School; } And School interface like this: { id: int; name: string; …
Carlac
  • 11
  • 1
0
votes
0 answers

Storing terabytes of records with minimum overhead

I need to store an enourmous (billions) amount of data in Key->Value kind of table. each key is 8 bytes and value is 32 bytes. From my calculations, I need around 40 TB for the storage alone. Let's say I have this amount of disk capacity, what…
user37741
  • 370
  • 1
  • 10
0
votes
0 answers

How can I quickly extract values from key-value pair vector in R?

I am new in R and I have some problems. I have key-value pair vector kv_vect which contains lots of pairs: > length(kv_vect) [1] 296538 > head(kv_vect, 5) [[1]] [1] 3209 [[2]] [1] 234 [[3]] [1] 755 [[4]] [1] 3 [[5]] [1] 46 How can I quickly…
alxdid5
  • 1
  • 1
0
votes
1 answer

How to use a key from source JSON as a value in the output using JSONata?

I have JSON data where the keys are dynamic and I want to use these keys as values in my output. For example, consider the following JSON as source: { "skills":{ "Axel":[ "MSOffice", "SQL", "Photoshop" ], "Ronda":[ …
Akshit
  • 5
  • 3
0
votes
3 answers

Creating a new column of a data frame using a dictionary with partial string matching

I'm new to coding and any help would be appreciated. Function should take a pandas dataframe as input. Extract the city from a tweet using the has_Dict dictionary given below, and insert the result into a new column named 'City' in the same…
Phillippa
  • 1
  • 1
0
votes
1 answer

I am trying to take user inputs and put them into a dataframe via a dictionary, but I get a "Length of values does not match length of index error

I'm currently using the Streamlit library on python to make a webapp for one of my projects that will take user input data from interacting with sliders. However, when I try to store the user input data into a dataframe via a dictionary, I'm getting…
0
votes
2 answers

Python txt file into key value pair

race, football, badminton yellow, 10, 20 white, 50, 30 red, 80, 100 I have a data similar as above (which is more complex). I wish form the key value pair where the result is as below: 'yellow': {'football': 10, 'badminton': 20}, 'white':…
Joe
  • 1
1 2 3
99
100