two factors JSON sorting

I found an example of script exellent to sort a JSON according to a specified key:

function sortJSON (key, data sort,) {}

Return data.sort (function (a, b) {})

var x = a [key]; var y = b [key];

If (way = '123') {return ((x < y)?-1: ((x > y)? 1: 0)) ;}}

If (way = '321') {return ((x > y)?-1: ((x < y)? 1: 0)) ;}}

});

}

where:

data = JSON to sort

key = key you want to sort with

path = alphabetical order

My JSON is as follows:

var POL =]

{cName: "John Doe", cDate: new Date (2005, 4, 16), cPassword: "162151" ", cTeam:34, cEmail:"[email protected]""},

{cName: "Jane Doe", cDate: new Date (2005, 4, 16), cPassword: "161974" ", cTeam:34, cEmail:"[email protected]""},

{cName: "Jack Doe", cDate: new Date (2013, 3, 22), cPassword: "167406" ", cTeam:34, cEmail:"[email protected]""},

...

]

I need to sort the JSON by cDate first, but assumed there are identical dates, I need to sort these by cPassword

How can I update my script, maybe I need something totally different or maybe is it still possible?

No, you need to do everything in a single function.
Basically, it would be something like this:

If {(a.cDate is b.cDate)

compare passwords

} else {}

compare dates

}

Tags: Acrobat

Similar Questions

  • Two-factor authentication

    On my iMac after Sierra was an option to unlock with Apple Watch (security preferences panel). I click it and it says I need to disable the verification of two factor and enable two-factor authentication. Fine.

    Did. Now the option to activate Apple Watch unlock on the mac has disappeared.

    It works on my other Mac but not the iMac.

    Also in the preferences to iCloud account, then on devices, I see that my Apple Watch can be used to receive the codes!

    Someone knows how to fix these?

    Tried to run iCloud power switch, disconnect the watch and repair, restart everything.

    Just to be clear, the Mac is capable of auto unlock, it's an iMac end of 2015 and system report confirms it is compatible.

    The apple support page also suggests watches should be able to receive the codes:

  • Two-factor monitoring iPhone

    Hey.

    Let´s say that my iPhone would be stolen and I have two-factor authentication, the thief will not be able to see the request of "log - inn?

    How does grace to find my iPhone?

    Not if you have enabled find my phone that allows blocking of activation which protects your phone/data.

    If you also use a strong authentication code, access to your lost or stolen phone is blocked, as is the ability to view/use your 2FA codes.

    The phone is virtually useless to them for any purpose.

  • Can I choose my device of trust preferred to iCloud two-factor authentication?

    I've recently implemented Icloud two-factor authentication, because I love the he adds extra security.

    As usual, I have my macbook on me, I also have to log on windows pc, every now and then.

    Unfortunately, ICloud chooses my headless mac mini which I use as a server at home instead of my laptop or Iphone.

    I would like to stop receiving the confirmation on this machine code, everyone was faced with a similar problem?

    If so how to solve it?

    Codes to go to all the secure devices.

    Of course, you can trust features remove at any time.

  • Zambia - two-factor authentication

    I wanted to set up authentication two factor for my access iCloud.  Zambia does not appear on the drop-down list numbering country codes, so I couldn't continue.  Any ideas in addition to a password?

    I've wanted to do this to the attention of Apple support, but fell select my position as Zambia was not an option under the Africa/Middle East.  (I'm sure I did contact the Apple Support before...)

    What subject of audit in two steps instead, though of course it is available for your country?

  • Why Apple has the code of two factor authentication on the same device that I log in with?

    I just installed Sierra and chose to use the two factor authentication with my iPhone chosen as a device to receive the code.

    But then, Apple displays a digit code 6 on my Mac itself and then asked me to go on my Mac.

    What sense does that make?

    A wild guess - were you log into your account in Safari on Mac when he showed you the digit code 6 on Mac? And you had already completed the sign-in icloud in System Preferences?

    If so, the macOS has been approved, but Safari wasn't. If macOS was able to show the code. It seems strange to first have the same computer application and provide the code, but really it is two layers of security and you had gotten through the first layer already.

  • two-factor authentication is not available for your apple at the moment ID

    (two-factor authentication is not available for your apple at the moment ID), how can I solve this problem? I can't run many features such as Apple Watch unlock in Sierra, please help

    I had this same problem, the message that, ' two-factor authentication is not available for your apple at the moment ID. " All my devices have been updated to the latest version of the software, and all other requirements have been met. I couldn't use two-factor authentication and I couldn't open my mac using my Apple Watch.  After contacting the Apple Support, they told me that because I had an email address @mac.com older, this address was not "verified." And that the system was not able to verify the address by sending an email with a link as it does normally; He could do that for more recent @me and addresses of @icloud. Apple had to have a service technician manually to send me an email of check to my address @mac.com. I clicked on the link in the email (I don't need to enter other information), and two factors was not available instantly. Hope that you will find your problem will be solved.

  • Trusted devices two-factor authentication

    I'm selling my iphone more than 6 s and need to erase and I use two-factor authentication and need to remove it from the list of secure devices, so what do I do first the trusted device erase or delete?

    Erasure of the device is not related to her being a device of trust. They are distinct from the "things".

    See here > > > for Apple ID - Apple Support two-factor authentication

  • How can I configure on a second two-factor authentication apple that isn't an icloud but rather my itunes account account ID? Only, I seem to be able to use two steps on the second account.

    How can I configure on a second two-factor authentication apple that isn't an icloud but rather my itunes account account ID? Only, I seem to be able to use two steps on the second account.

    You can not. Two Apple factor authentication is a feature of iOS and OS X, based on your AppleID being associated with iCloud account to send and receive authentication 6-digit codes. An AppleID that is not associated with iCloud account cannot be used for 2-factor authentication.

    For Apple ID - Apple Support two-factor authentication

    You can set up validation in 2 steps (which is different) with any AppleID - see frequently asked questions about check in two steps for Apple ID - Apple Support

  • Cannot go beyond two-factor authentication, because I don't have access to my phone.

    My iphone completely went out on me a few weeks ago and I was using imessage on my mac to keep in touch. My imessage began to act up and do not produce others with imessage, so I thought I would try to sign out and sign back in to fix it. Now, I have absolutely no way to sign in imessage, because his demanding for a verification of a second trust device code I have not. I can't get a code from apple or even connect all the way to my account. Everywhere I'm shooting I need this code of two factors, but I have ZERO my secure devices. Could really use some help.

    If your phone has stopped working or not, there's no reason you can't use the number on another phone.

  • How to restore two-factor authentication?

    How can I restore two factor authentication after having set up authentication in two steps?

    I use:

    • OS X El Capitan v 10.11.5 on MacBook Pro 13 "early 2015
    • 9 IOS on iPhone 4S

    I have mistakenly set up authentication in two steps without realizing that the improved two-factor authentication is built into iOS 9 and OS X 10.  I must have forgotten two-factor authentication configuration when I implemented the new MacBook a year ago.

    Try turning off authentication step 2 to see if you have then the possibility to select.

  • Two-factor authentication not shown

    I read the link on the support of authentication article two-factorhttps://support.apple.com/en-us/HT205075 and I followed his suggestion to have a credit card on file.

    For my iCloud account, I don't see the selection option of authentication to two factors on one of my macs and one of my iPhones.   I'm under 10.11.5 on the macbook pro and 9.3.2 on my iPhone 6.

    I have not tried the other my Mac to see if the option is available.

    How can I get two factor authentication enabled?

    Should I just call Apple support?

    You have enabled audit stage 2.

  • Problem with the two factor authentication with Apple TV.

    I tried to connect to my Apple TV (2nd generation, operating system and updates are up-to-date), log-in failed and indicated that I had to use two-factor authentication which I recently install on my trust Apple devices which included my iMac, iPhone and iPad. As expected, I received a notice on my Apple devices trust with the verification code to six figures to add this code to six figures at the end of my password when signing in the Apple TV. I put my password and add the code check digit at the end on my password. It did not work. Now I can not connect. Any suggestions to connect to Apple TV using 2nd generation two-factor authentication? This Apple TV device is not supported?

    There is model of Apple TV MC572LL/A with Apple TV software version 6.2.1

    Model identifier is AppleTV2, 1

    Model number is A1378

    People have been facing difficulties with this process. I have not encountered such difficulties then have not had the opportunity to test solutions. While a little pain can I suggest that you disable temporarily two authentication step until you have set up your Apple TV.

  • Need to disable CGI, I have two-factor authentication, but I don't have the phone number or device with me. What can I do?

    Need to disable CGI, I have two-factor authentication, but I don't have the phone number or device with me. What can I do?

    For Apple ID - Apple Support two-factor authentication

    If I can not connect, how I again to access my account?

    If you can't sign in, reset your password, or receive verification codes, you can account recovery application to restore access to your account. Account recovery is an automatic process designed to help you back into your account as soon as possible while denying access to anyone who might be impersonating you. It may take a few days - or more - depending on the specific account information, you provide to verify your identity.

    It will be your option. If you try to find an iPhone with locking Activation that you don't remember the password, you can remove the account from the iPhone with the help of Apple's Support with the receipt of the initial purchase of the iPhone as a way to prove that you are the real owner of this iPhone.

  • Two factor authentication, how to store Cookies?

    So, I began to set up authentication two factor for various connections I have. As a normal practice, whenever I have close no matter what browser I have delete all cookies, and when my computer is shut down I get a Norton scan for cookies and delete them. The problem is that it removes my two factors authentication cookies I need. I tried the implementation of an exception, but the cookies are deleted anyway. How can I set this up to work, that is to say protect specific cookies from deletion?

    In Internet Explorer, it's extremely easy to do. All do you is put a check mark next to "preserve the favorite Web site data"... Fact. In Firefox, you would think is equivalent to "Preferences of Site", but it works the same in IE and cookies are deleted.

    SOLVED.

    I finally thought to try different combinations. Unlike the way I expect it works with the exceptions of cookie, the ' * ' character match only matches the 'cookie name', not all the path for a while in the 'site name'. In other words, *. Google.com will not protect the cookies which are also under mail.google.com. In this case both *. Google.com and *. mail.Google.com are necessary. As an example of the real world, the exceptions that work with Google two-factor authentication, which covers 20 + cookies that must be preserved, are:

    (Once more, the forum I cannot enter the character 'stars' on the keyboard in what appears on the forum as a url)

    (enter starting here).accounts.google.com
    (enter starting here).accounts.youtube.com
    (enter starting here).google.com
    (enter starting here).mail.google.com
    (enter starting here).plus.google.com
    (enter starting here).youtube.com

Maybe you are looking for

  • Speed USB StorE Art 320gig & read/write question

    Hi all I have a HARD 321gig store that has developed a strange problem, first thing I noticed when I was adaptation files and it took much longer than then usual, so I checked the speed drive using HD Tune and every time I read or write data on the d

  • Pilots went satellite A210 page?

    What the... I need to download the drivers for Toshiba A210 PSAELE Notebook, and all of a sudden, the page disappeared? Can someone help me with this? It's the kind of criticism that I want to reinstall XP and then I need drivers before, otherwise it

  • Soft pictures for Mac: how to determine the size of the image file

    Question: in the Photos for Mac, how can I determine the size of a photo or a video file Set-up the info panel does not include the size of the file. Furthermore, I don't see any place where I can do a "show in finder" to find the information in this

  • Touchpad works every time Satellite C850 - 11b is restarted

    Hello. Whenever I re - turn on the laptop the Synaptec touchpad does not work if I have to use a mouse. In Device Manager it say it works and was the last driver installed. After a while he started working for no apparent reason. All advice appreciat

  • I can't download the coupon printer.

    Recently, I noticed that my wife Hotmail account will not send emails. She also does online coupons, they will not print. I removed the old coupon set up is not installed. In the hope for a repair reinstall. Did not asking for windows 7 ideas